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