handle ungrab crossings for FFM & mouse preference

BUG: 142040
REVIEW: 104316
This commit is contained in:
Thomas Lübking 2012-03-17 15:34:32 +01:00
parent 1cedbe6c23
commit e99dc3ab5b

View file

@ -864,9 +864,10 @@ void Client::enterNotifyEvent(XCrossingEvent* e)
{
if (e->window != frameId())
return; // care only about entering the whole frame
if (e->mode == NotifyNormal ||
(!options->focusPolicyIsReasonable() &&
e->mode == NotifyUngrab)) {
#define MOUSE_DRIVEN_FOCUS (!options->focusPolicyIsReasonable() || \
(options->focusPolicy() == Options::FocusFollowsMouse && options->isNextFocusPrefersMouse()))
if (e->mode == NotifyNormal || (e->mode == NotifyUngrab && MOUSE_DRIVEN_FOCUS)) {
if (options->isShadeHover()) {
cancelShadeHoverTimer();
@ -877,6 +878,7 @@ void Client::enterNotifyEvent(XCrossingEvent* e)
shadeHoverTimer->start(options->shadeHoverInterval());
}
}
#undef MOUSE_DRIVEN_FOCUS
if (options->focusPolicy() == Options::ClickToFocus)
return;