From e374a4957f52b3fcf351cc009226828f609acd31 Mon Sep 17 00:00:00 2001 From: Carlos Garnacho Date: Mon, 31 Jan 2022 12:16:47 +0100 Subject: [PATCH] grabHelper: Fix handling of events within the grabbed actor Commit d92b71d2b2 went overeager in the removal of the additional actors that were allowed to handle events (since the new grab infrastructure makes them unable to see events in the first place), and removed an early return in the captured event handler meant to let events go through in those cases. Since the grabbing actor was also part of this group, this was also the code path where child actors of the grabbing actor could handle events. Removing these made the captured event handler eat most events meant for children. Add this check back, specifically for the grabbing actor. While at it, explicitly check (and propagate) crossing events, since these are now enforced to be propagated (and warned about) in Mutter. Closes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/4991 Part-of: --- js/ui/grabHelper.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/js/ui/grabHelper.js b/js/ui/grabHelper.js index 11e06700e..05fe82a31 100644 --- a/js/ui/grabHelper.js +++ b/js/ui/grabHelper.js @@ -261,6 +261,11 @@ var GrabHelper = class GrabHelper { return Clutter.EVENT_PROPAGATE; } + if (type === Clutter.EventType.ENTER || + type === Clutter.EventType.LEAVE || + this.currentGrab.actor.contains(event.get_source())) + return Clutter.EVENT_PROPAGATE; + if (Main.keyboard.shouldTakeEvent(event)) return Clutter.EVENT_PROPAGATE;