display: Bypass focus window during grabs

This is what the old COMPOSITOR_GRAB check effectively did (by
returning the grab_window, which is only set during window grab
operations).

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2436>
This commit is contained in:
Florian Müllner 2022-05-27 19:15:38 +02:00 committed by Marge Bot
parent 937651cf0e
commit 75856043d4

View File

@ -91,6 +91,9 @@ get_window_for_event (MetaDisplay *display,
{ {
MetaWindowActor *window_actor; MetaWindowActor *window_actor;
if (stage_has_grab (display))
return NULL;
/* Always use the key focused window for key events. */ /* Always use the key focused window for key events. */
if (IS_KEY_EVENT (event)) if (IS_KEY_EVENT (event))
{ {
@ -105,7 +108,6 @@ get_window_for_event (MetaDisplay *display,
return NULL; return NULL;
} }
case META_EVENT_ROUTE_WINDOW_OP: case META_EVENT_ROUTE_WINDOW_OP:
case META_EVENT_ROUTE_COMPOSITOR_GRAB:
case META_EVENT_ROUTE_WAYLAND_POPUP: case META_EVENT_ROUTE_WAYLAND_POPUP:
case META_EVENT_ROUTE_FRAME_BUTTON: case META_EVENT_ROUTE_FRAME_BUTTON:
return display->grab_window; return display->grab_window;