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




commit 9ccde0002445f2a57ae21b9c98d6656a2f19fc89
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 check for bypass_wayland being unset beforehand.
    
    Fixes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/5020

 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..3e46d426a5 100644
--- a/src/core/events.c
+++ b/src/core/events.c
@@ -517,7 +517,7 @@ meta_display_handle_event (MetaDisplay        *display,
     bypass_wayland = TRUE;
 
   /* If a Wayland client has a grab, don't pass that through to Clutter */
-  if (display->event_route == META_EVENT_ROUTE_WAYLAND_POPUP)
+  if (!bypass_wayland && display->event_route == META_EVENT_ROUTE_WAYLAND_POPUP)
     bypass_clutter = TRUE;
 
 #ifdef HAVE_WAYLAND


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