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
This commit is contained in:
Martin Flöser 2017-06-19 18:17:46 +02:00
parent 92207be904
commit 763fbf5faf

View file

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