[mutter/wip/carlosg/self-deprecating-handler] core: Do not eat both wayland and clutter events with wayland popups




commit d838460fe945abbd6034bffc693b74486609a179
Author: Carlos Garnacho <carlosg gnome org>
Date:   Fri Feb 4 16:34:06 2022 +0100

    core: Do not eat both wayland and clutter events with wayland popups
    
    There may be situations where we may stack a ClutterGrab on top of a
    wayland popup's. Since ClutterGrab should win over client grabs, we
    mostly correctly figure out that it should start doing
    bypass_wayland=TRUE and bypass_clutter=FALSE while the ClutterGrab
    holds, however the late checks for the MetaDisplay event route can
    still toggle bypass_clutter on, resulting in neither handling events.
    
    This check for wayland popups in the display event route should just
    enforce wayland handling if wayland is meant to be receiving events,
    so ensure these don't mix together.
    
    Fixes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/5020
    Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2271>

 src/core/events.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/src/core/events.c b/src/core/events.c
index 4d5f0ba305..a79bf9f803 100644
--- a/src/core/events.c
+++ b/src/core/events.c
@@ -518,7 +518,7 @@ meta_display_handle_event (MetaDisplay        *display,
 
   /* If a Wayland client has a grab, don't pass that through to Clutter */
   if (display->event_route == META_EVENT_ROUTE_WAYLAND_POPUP)
-    bypass_clutter = TRUE;
+    bypass_clutter = !bypass_wayland;
 
 #ifdef HAVE_WAYLAND
   if (compositor && !bypass_wayland)


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