Port Workspace::clientUnderMouse to AbstractClient

This commit is contained in:
Martin Gräßlin 2016-02-18 10:28:00 +01:00
parent 6d47839e95
commit df4bb8296a
3 changed files with 5 additions and 5 deletions

View file

@ -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<Client*>(*(--it));
AbstractClient *client = qobject_cast<AbstractClient*>(*(--it));
if (!client) {
continue;
}

View file

@ -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 {

View file

@ -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);