From 763fbf5fafd01ef7ecf0bc69818da74060d08ce8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Fl=C3=B6ser?= Date: Mon, 19 Jun 2017 18:17:46 +0200 Subject: [PATCH] Make Workspace::switchWindow operate on AbstractClient Summary: By using AbstractClient instead of Client the method works also for Wayland windows. Reviewers: #kwin, #plasma Subscribers: plasma-devel, kwin Tags: #kwin Differential Revision: https://phabricator.kde.org/D6275 --- useractions.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/useractions.cpp b/useractions.cpp index 502be96b3c..0e26147c7f 100644 --- a/useractions.cpp +++ b/useractions.cpp @@ -1597,12 +1597,12 @@ void Workspace::switchWindow(Direction direction) bool Workspace::switchWindow(AbstractClient *c, Direction direction, QPoint curPos, int d) { - Client *switchTo = nullptr; + AbstractClient *switchTo = nullptr; int bestScore = 0; ToplevelList clist = stackingOrder(); for (ToplevelList::Iterator i = clist.begin(); i != clist.end(); ++i) { - Client *client = qobject_cast(*i); + auto client = qobject_cast(*i); if (!client) { continue; }