mirror of
https://github.com/brl/mutter.git
synced 2024-11-23 00:20:42 -05:00
core: Move grab_op check for handling window events from passive grabs
This piece of event handling only applies on windows receiving events while the display is ungrabbed (i.e. for raising it, or beginning a move/resize operation). Move the checks on the current grab operation outside of window.c and into events.c, so all checks about the current grab operation move closer to the main event handler. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2683>
This commit is contained in:
parent
a5bd0c39fe
commit
a7b8f06196
@ -470,7 +470,9 @@ meta_display_handle_event (MetaDisplay *display,
|
||||
*/
|
||||
bypass_clutter = !IS_GESTURE_EVENT (event);
|
||||
bypass_wayland = meta_window_has_modals (window);
|
||||
meta_window_handle_ungrabbed_event (window, event);
|
||||
|
||||
if (display->grab_op == META_GRAB_OP_NONE)
|
||||
meta_window_handle_ungrabbed_event (window, event);
|
||||
|
||||
/* This might start a grab op. If it does, then filter out the
|
||||
* event, and if it doesn't, replay the event to release our
|
||||
|
@ -8295,9 +8295,6 @@ meta_window_handle_ungrabbed_event (MetaWindow *window,
|
||||
else
|
||||
button = clutter_event_get_button (event);
|
||||
|
||||
if (display->grab_op != META_GRAB_OP_NONE)
|
||||
return;
|
||||
|
||||
/* Some windows might not ask for input, in which case we might be here
|
||||
* because we selected for ButtonPress on the root window. In that case,
|
||||
* we have to take special care not to act for an override-redirect window.
|
||||
|
Loading…
Reference in New Issue
Block a user