[gnome-shell/wip/carlosg/grab-helper-captured-events: 1/4] grabHelper: Fix handling of events within the grabbed actor
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell/wip/carlosg/grab-helper-captured-events: 1/4] grabHelper: Fix handling of events within the grabbed actor
- Date: Tue, 1 Feb 2022 14:24:53 +0000 (UTC)
commit 038926f713a51cc1bc7e9ab9f881f189d131ca2b
Author: Carlos Garnacho <carlosg gnome org>
Date: Mon Jan 31 12:16:47 2022 +0100
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
js/ui/grabHelper.js | 5 +++++
1 file changed, 5 insertions(+)
---
diff --git a/js/ui/grabHelper.js b/js/ui/grabHelper.js
index 11e06700e4..05fe82a31a 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;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]