From a9d8926d3c142de10cb315b35382f10ef125a6e4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Gr=C3=A4=C3=9Flin?= Date: Mon, 14 Sep 2015 13:31:41 +0200 Subject: [PATCH] Workspace::findDesktop returns AbstractClient --- layers.cpp | 6 +++--- workspace.cpp | 2 +- workspace.h | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/layers.cpp b/layers.cpp index d8c75776db..ff434ecaea 100644 --- a/layers.cpp +++ b/layers.cpp @@ -262,19 +262,19 @@ Client* Workspace::topClientOnDesktop(int desktop, int screen, bool unconstraine 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 ); if (topmost) { for (int i = stacking_order.size() - 1; i >= 0; i--) { - Client *c = qobject_cast(stacking_order.at(i)); + AbstractClient *c = qobject_cast(stacking_order.at(i)); if (c && c->isOnDesktop(desktop) && c->isDesktop() && c->isShown(true)) return c; } } else { // bottom-most foreach (Toplevel * c, stacking_order) { - Client *client = qobject_cast(c); + AbstractClient *client = qobject_cast(c); if (client && c->isOnDesktop(desktop) && c->isDesktop() && client->isShown(true)) return client; diff --git a/workspace.cpp b/workspace.cpp index e10ee07a50..fc9f80f0c4 100644 --- a/workspace.cpp +++ b/workspace.cpp @@ -352,7 +352,7 @@ void Workspace::init() } // End updates blocker block - Client* new_active_client = NULL; + AbstractClient* new_active_client = nullptr; if (!qApp->isSessionRestored()) { --block_focus; new_active_client = findClient(Predicate::WindowMatch, client_info.activeWindow()); diff --git a/workspace.h b/workspace.h index 89cccd6f70..3da9efa4b4 100644 --- a/workspace.h +++ b/workspace.h @@ -247,7 +247,7 @@ public: Client* topClientOnDesktop(int desktop, int screen, bool unconstrained = false, 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 windowToPreviousDesktop(AbstractClient* c); void windowToNextDesktop(AbstractClient* c);