mirror of
https://github.com/brl/mutter.git
synced 2024-11-26 18:11:05 -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,6 +470,8 @@ meta_display_handle_event (MetaDisplay *display,
|
|||||||
*/
|
*/
|
||||||
bypass_clutter = !IS_GESTURE_EVENT (event);
|
bypass_clutter = !IS_GESTURE_EVENT (event);
|
||||||
bypass_wayland = meta_window_has_modals (window);
|
bypass_wayland = meta_window_has_modals (window);
|
||||||
|
|
||||||
|
if (display->grab_op == META_GRAB_OP_NONE)
|
||||||
meta_window_handle_ungrabbed_event (window, event);
|
meta_window_handle_ungrabbed_event (window, event);
|
||||||
|
|
||||||
/* This might start a grab op. If it does, then filter out the
|
/* This might start a grab op. If it does, then filter out the
|
||||||
|
@ -8295,9 +8295,6 @@ meta_window_handle_ungrabbed_event (MetaWindow *window,
|
|||||||
else
|
else
|
||||||
button = clutter_event_get_button (event);
|
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
|
/* 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,
|
* 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.
|
* we have to take special care not to act for an override-redirect window.
|
||||||
|
Loading…
Reference in New Issue
Block a user