[mutter] display: Bypass focus window during grabs



commit 75856043d4a61d310ef471cc81bc53a9af37fbc4
Author: Florian Müllner <fmuellner gnome org>
Date:   Fri May 27 19:15:38 2022 +0200

    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>

 src/core/events.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
---
diff --git a/src/core/events.c b/src/core/events.c
index 1863e8a58d..cd81449194 100644
--- a/src/core/events.c
+++ b/src/core/events.c
@@ -91,6 +91,9 @@ get_window_for_event (MetaDisplay        *display,
       {
         MetaWindowActor *window_actor;
 
+        if (stage_has_grab (display))
+          return NULL;
+
         /* Always use the key focused window for key events. */
         if (IS_KEY_EVENT (event))
           {
@@ -105,7 +108,6 @@ get_window_for_event (MetaDisplay        *display,
           return NULL;
       }
     case META_EVENT_ROUTE_WINDOW_OP:
-    case META_EVENT_ROUTE_COMPOSITOR_GRAB:
     case META_EVENT_ROUTE_WAYLAND_POPUP:
     case META_EVENT_ROUTE_FRAME_BUTTON:
       return display->grab_window;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]