handle ungrab crossings for FFM & mouse preference
BUG: 142040 REVIEW: 104316
This commit is contained in:
parent
1cedbe6c23
commit
e99dc3ab5b
1 changed files with 5 additions and 3 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue