[mutter/wip/carlosg/grabs-pt1: 29/30] 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-pt1: 29/30] clutter: Cancel ClutterGestureActions on leave+grab_notify events
- Date: Fri, 29 Oct 2021 16:29:17 +0000 (UTC)
commit a345d159443536c4b3377d0b0a6c75d61db95f95
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]