Workspace::findDesktop returns AbstractClient
This commit is contained in:
parent
a421f546cd
commit
a9d8926d3c
3 changed files with 5 additions and 5 deletions
|
@ -262,19 +262,19 @@ Client* Workspace::topClientOnDesktop(int desktop, int screen, bool unconstraine
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
Client* Workspace::findDesktop(bool topmost, int desktop) const
|
AbstractClient* Workspace::findDesktop(bool topmost, int desktop) const
|
||||||
{
|
{
|
||||||
// TODO Q_ASSERT( block_stacking_updates == 0 );
|
// TODO Q_ASSERT( block_stacking_updates == 0 );
|
||||||
if (topmost) {
|
if (topmost) {
|
||||||
for (int i = stacking_order.size() - 1; i >= 0; i--) {
|
for (int i = stacking_order.size() - 1; i >= 0; i--) {
|
||||||
Client *c = qobject_cast<Client*>(stacking_order.at(i));
|
AbstractClient *c = qobject_cast<AbstractClient*>(stacking_order.at(i));
|
||||||
if (c && c->isOnDesktop(desktop) && c->isDesktop()
|
if (c && c->isOnDesktop(desktop) && c->isDesktop()
|
||||||
&& c->isShown(true))
|
&& c->isShown(true))
|
||||||
return c;
|
return c;
|
||||||
}
|
}
|
||||||
} else { // bottom-most
|
} else { // bottom-most
|
||||||
foreach (Toplevel * c, stacking_order) {
|
foreach (Toplevel * c, stacking_order) {
|
||||||
Client *client = qobject_cast<Client*>(c);
|
AbstractClient *client = qobject_cast<AbstractClient*>(c);
|
||||||
if (client && c->isOnDesktop(desktop) && c->isDesktop()
|
if (client && c->isOnDesktop(desktop) && c->isDesktop()
|
||||||
&& client->isShown(true))
|
&& client->isShown(true))
|
||||||
return client;
|
return client;
|
||||||
|
|
|
@ -352,7 +352,7 @@ void Workspace::init()
|
||||||
|
|
||||||
} // End updates blocker block
|
} // End updates blocker block
|
||||||
|
|
||||||
Client* new_active_client = NULL;
|
AbstractClient* new_active_client = nullptr;
|
||||||
if (!qApp->isSessionRestored()) {
|
if (!qApp->isSessionRestored()) {
|
||||||
--block_focus;
|
--block_focus;
|
||||||
new_active_client = findClient(Predicate::WindowMatch, client_info.activeWindow());
|
new_active_client = findClient(Predicate::WindowMatch, client_info.activeWindow());
|
||||||
|
|
|
@ -247,7 +247,7 @@ public:
|
||||||
|
|
||||||
Client* topClientOnDesktop(int desktop, int screen, bool unconstrained = false,
|
Client* topClientOnDesktop(int desktop, int screen, bool unconstrained = false,
|
||||||
bool only_normal = true) const;
|
bool only_normal = true) const;
|
||||||
Client* findDesktop(bool topmost, int desktop) const;
|
AbstractClient* findDesktop(bool topmost, int desktop) const;
|
||||||
void sendClientToDesktop(AbstractClient* c, int desktop, bool dont_activate);
|
void sendClientToDesktop(AbstractClient* c, int desktop, bool dont_activate);
|
||||||
void windowToPreviousDesktop(AbstractClient* c);
|
void windowToPreviousDesktop(AbstractClient* c);
|
||||||
void windowToNextDesktop(AbstractClient* c);
|
void windowToNextDesktop(AbstractClient* c);
|
||||||
|
|
Loading…
Reference in a new issue