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

Fixes unintended autoraises when switching workspaces.

BUG: 306281
FIXED-IN: 4.9.2
icc-effect-5.14.5
Michael Hohmuth 2012-09-04 23:36:39 +02:00 committed by Thomas Lübking
parent 42ad299d88
commit 371a29096b
1 changed files with 2 additions and 1 deletions

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