diff --git a/useractions.cpp b/useractions.cpp index ce1c28e13a..1432627f9b 100644 --- a/useractions.cpp +++ b/useractions.cpp @@ -1682,7 +1682,7 @@ void Workspace::switchWindow(Direction direction) Client *c = active_client; Client *switchTo = 0; int bestScore = 0; - int d = c->desktop(); + int d = c->isOnAllDesktops() ? VirtualDesktopManager::self()->current() : c->desktop(); // Centre of the active window QPoint curPos(c->pos().x() + c->geometry().width() / 2, c->pos().y() + c->geometry().height() / 2);