From df4bb8296a675ba1645b6269357dd67e2df86556 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Gr=C3=A4=C3=9Flin?= Date: Thu, 18 Feb 2016 10:28:00 +0100 Subject: [PATCH] Port Workspace::clientUnderMouse to AbstractClient --- activation.cpp | 4 ++-- useractions.cpp | 4 ++-- workspace.h | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/activation.cpp b/activation.cpp index d6fbc5c921..98c06c1935 100644 --- a/activation.cpp +++ b/activation.cpp @@ -410,11 +410,11 @@ void Workspace::clientHidden(AbstractClient* c) activateNextClient(c); } -Client *Workspace::clientUnderMouse(int screen) const +AbstractClient *Workspace::clientUnderMouse(int screen) const { ToplevelList::const_iterator it = stackingOrder().constEnd(); while (it != stackingOrder().constBegin()) { - Client *client = qobject_cast(*(--it)); + AbstractClient *client = qobject_cast(*(--it)); if (!client) { continue; } diff --git a/useractions.cpp b/useractions.cpp index 1ed6014053..95861cceda 100755 --- a/useractions.cpp +++ b/useractions.cpp @@ -1204,7 +1204,7 @@ bool Client::performMouseCommand(Options::MouseCommand command, const QPoint &gl // used to be activateNextClient(this), then topClientOnDesktop // since this is a mouseOp it's however safe to use the client under the mouse instead if (isActive() && options->focusPolicyIsReasonable()) { - Client *next = workspace()->clientUnderMouse(screen()); + AbstractClient *next = workspace()->clientUnderMouse(screen()); if (next && next != this) workspace()->requestFocus(next, false); } @@ -1384,7 +1384,7 @@ void Workspace::slotWindowLower() //activateNextClient( c ); // Doesn't work when we lower a child window if (active_client->isActive() && options->focusPolicyIsReasonable()) { if (options->isNextFocusPrefersMouse()) { - Client *next = clientUnderMouse(active_client->screen()); + AbstractClient *next = clientUnderMouse(active_client->screen()); if (next && next != active_client) requestFocus(next, false); } else { diff --git a/workspace.h b/workspace.h index 432dbf4a9c..4191f70aca 100644 --- a/workspace.h +++ b/workspace.h @@ -148,7 +148,7 @@ public: */ AbstractClient* mostRecentlyActivatedClient() const; - Client* clientUnderMouse(int screen) const; + AbstractClient* clientUnderMouse(int screen) const; void activateClient(AbstractClient*, bool force = false); void requestFocus(AbstractClient* c, bool force = false);