From 5f429625f09c03da46450b0ff26b0c03a33e6315 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Gr=C3=A4=C3=9Flin?= Date: Mon, 14 Sep 2015 13:37:11 +0200 Subject: [PATCH] Workspace::topClientOnDesktop returns AbstractClient --- layers.cpp | 4 ++-- workspace.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/layers.cpp b/layers.cpp index ff434ecaea..2aec6181d6 100644 --- a/layers.cpp +++ b/layers.cpp @@ -235,7 +235,7 @@ void Workspace::propagateClients(bool propagate_new_clients) doesn't accept focus it's excluded. */ // TODO misleading name for this method, too many slightly different ways to use it -Client* Workspace::topClientOnDesktop(int desktop, int screen, bool unconstrained, bool only_normal) const +AbstractClient* Workspace::topClientOnDesktop(int desktop, int screen, bool unconstrained, bool only_normal) const { // TODO Q_ASSERT( block_stacking_updates == 0 ); ToplevelList list; @@ -246,7 +246,7 @@ Client* Workspace::topClientOnDesktop(int desktop, int screen, bool unconstraine for (int i = list.size() - 1; i >= 0; --i) { - Client *c = qobject_cast(list.at(i)); + AbstractClient *c = qobject_cast(list.at(i)); if (!c) { continue; } diff --git a/workspace.h b/workspace.h index 3da9efa4b4..f2ab232202 100644 --- a/workspace.h +++ b/workspace.h @@ -245,7 +245,7 @@ public: ClientList ensureStackingOrder(const ClientList& clients) const; QList ensureStackingOrder(const QList &clients) const; - Client* topClientOnDesktop(int desktop, int screen, bool unconstrained = false, + AbstractClient* topClientOnDesktop(int desktop, int screen, bool unconstrained = false, bool only_normal = true) const; AbstractClient* findDesktop(bool topmost, int desktop) const; void sendClientToDesktop(AbstractClient* c, int desktop, bool dont_activate);