Do not autoraise a window unless the mouse has been moved.

Fixes unintended autoraises when switching workspaces.

BUG: 306281
FIXED-IN: 4.9.2
This commit is contained in:
Michael Hohmuth 2012-09-04 23:36:39 +02:00 committed by Thomas Lübking
parent 42ad299d88
commit 371a29096b

View file

@ -882,8 +882,10 @@ void Client::enterNotifyEvent(XCrossingEvent* e)
if (options->focusPolicy() == Options::ClickToFocus || workspace()->windowMenuShown())
return;
QPoint currentPos(e->x_root, e->y_root);
if (options->isAutoRaise() && !isDesktop() &&
!isDock() && workspace()->focusChangeEnabled() &&
currentPos != workspace()->focusMousePosition() &&
workspace()->topClientOnDesktop(workspace()->currentDesktop(),
options->isSeparateScreenFocus() ? screen() : -1) != this) {
delete autoRaiseTimer;
@ -893,7 +895,6 @@ void Client::enterNotifyEvent(XCrossingEvent* e)
autoRaiseTimer->start(options->autoRaiseInterval());
}
QPoint currentPos(e->x_root, e->y_root);
if (isDesktop() || isDock())
return;
// for FocusFollowsMouse, change focus only if the mouse has actually been moved, not if the focus