mirror of
https://github.com/brl/mutter.git
synced 2024-12-23 11:32:04 +00:00
events: Only process Enter/Leave events when in the normal route
This prevents issues from happening when processing Enter/Leave events while in another kind of grab op like a Wayland popup or resizing a window. This can't ever really happen except outside of a race condition, with the X server, since we won't ever pass input events to the X server in any of these cases, but it can't hurt to be more correct about what the intended operation is.
This commit is contained in:
parent
ae292c856b
commit
c8cc4344f2
@ -848,7 +848,7 @@ handle_input_xevent (MetaDisplay *display,
|
||||
switch (input_event->evtype)
|
||||
{
|
||||
case XI_Enter:
|
||||
if (display->grab_op == META_GRAB_OP_COMPOSITOR)
|
||||
if (display->event_route != META_EVENT_ROUTE_NORMAL)
|
||||
break;
|
||||
|
||||
/* Check if we've entered a window; do this even if window->has_focus to
|
||||
@ -867,7 +867,7 @@ handle_input_xevent (MetaDisplay *display,
|
||||
}
|
||||
break;
|
||||
case XI_Leave:
|
||||
if (display->grab_op == META_GRAB_OP_COMPOSITOR)
|
||||
if (display->event_route != META_EVENT_ROUTE_NORMAL)
|
||||
break;
|
||||
|
||||
if (window != NULL &&
|
||||
@ -905,7 +905,6 @@ handle_input_xevent (MetaDisplay *display,
|
||||
NULL,
|
||||
meta_display_get_current_time_roundtrip (display));
|
||||
}
|
||||
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user