make switchWindow FROM stickies act on current VD

it's probably the user expectation and few windows
are on all desktops

BUG: 331512
REVIEW: 123640
This commit is contained in:
Thomas Lübking 2015-05-05 12:24:41 +02:00
parent 77047aa555
commit b3bd9ea144

View file

@ -1691,7 +1691,7 @@ void Workspace::switchWindow(Direction direction)
AbstractClient *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);