From d838460fe945abbd6034bffc693b74486609a179 Mon Sep 17 00:00:00 2001 From: Carlos Garnacho Date: Fri, 4 Feb 2022 16:34:06 +0100 Subject: [PATCH] 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: --- 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 4d5f0ba30..a79bf9f80 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)