[mutter/wip/carlosg/grabs-pt2: 28/32] clutter: Cancel ClutterGestureActions on leave+grab_notify events
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter/wip/carlosg/grabs-pt2: 28/32] clutter: Cancel ClutterGestureActions on leave+grab_notify events
- Date: Thu, 25 Nov 2021 10:22:06 +0000 (UTC)
commit a2653fb54779cca8df230b5124f62191a79365ab
Author: Carlos Garnacho <carlosg gnome org>
Date: Fri Oct 29 12:52:52 2021 +0200
clutter: Cancel ClutterGestureActions on leave+grab_notify events
The lack of handling of regular crossing events here is dubious, perhaps
to be fixed later on. So far, ensure gestures are cancelled whenever
a grab-inducted crossing event would leave this action in the blue.
clutter/clutter/clutter-gesture-action.c | 9 +++++++++
1 file changed, 9 insertions(+)
---
diff --git a/clutter/clutter/clutter-gesture-action.c b/clutter/clutter/clutter-gesture-action.c
index a4f2de792f..5ff9754953 100644
--- a/clutter/clutter/clutter-gesture-action.c
+++ b/clutter/clutter/clutter-gesture-action.c
@@ -380,6 +380,15 @@ clutter_gesture_action_handle_event (ClutterAction *action,
return CLUTTER_EVENT_PROPAGATE;
}
+ if (priv->in_gesture && point &&
+ event_type == CLUTTER_LEAVE &&
+ (event->crossing.flags & CLUTTER_EVENT_FLAG_GRAB_NOTIFY) != 0)
+ {
+ priv->in_gesture = FALSE;
+ cancel_gesture (gesture_action);
+ return CLUTTER_EVENT_PROPAGATE;
+ }
+
switch (clutter_event_type (event))
{
case CLUTTER_BUTTON_PRESS:
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]