FSUM: honor delay on leave events as well

This makes working around bug #63279 impossible :-(

BUG: 285960
CCBUG: 63279
REVIEW: 103130
This commit is contained in:
Thomas Lübking 2011-11-13 18:23:49 +01:00
parent 26c0f269f1
commit 55c52977b3

View file

@ -895,7 +895,7 @@ void Client::enterNotifyEvent(XCrossingEvent* e)
}
QPoint currentPos(e->x_root, e->y_root);
if (options->focusPolicy != Options::FocusStrictlyUnderMouse && (isDesktop() || isDock()))
if (isDesktop() || isDock())
return;
// for FocusFollowsMouse, change focus only if the mouse has actually been moved, not if the focus
// change came because of window changes (e.g. closing a window) - #92290
@ -943,9 +943,9 @@ void Client::leaveNotifyEvent(XCrossingEvent* e)
shadeHoverTimer->start(options->shadeHoverInterval);
}
}
if (options->focusPolicy == Options::FocusStrictlyUnderMouse)
if (isActive() && lostMouse)
workspace()->requestFocus(0) ;
if (options->focusPolicy == Options::FocusStrictlyUnderMouse && isActive() && lostMouse) {
workspace()->requestDelayFocus(0);
}
return;
}
}