diff options
author | Carlos Garnacho <carlosg@gnome.org> | 2021-03-18 18:36:37 +0100 |
---|---|---|
committer | Carlos Garnacho <carlosg@gnome.org> | 2021-03-18 20:44:56 +0100 |
commit | df91fd10cec1684978cbb7496f4a9184ba0ccb6f (patch) | |
tree | 2ae5492297e8955eea3c8bad6786a714e005d093 /clutter/clutter/clutter-gesture-action.c | |
parent | 1f1bf4cd9d1c8a18c7ae1dd7f5e69be32546fa7c (diff) | |
download | mutter-df91fd10cec1684978cbb7496f4a9184ba0ccb6f.tar.gz |
clutter: Update ClutterGestureAction point position before ::prepare
We might want to perform distance/threshold checks in the ::prepare
vfunc, but we didn't record the last motion event yet. This used to
give a delta of 0/0 between the press and last motion coordinates,
despite the ClutterGestureAction having a trigger threshold. This
happens no longer.
Diffstat (limited to 'clutter/clutter/clutter-gesture-action.c')
-rw-r--r-- | clutter/clutter/clutter-gesture-action.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/clutter/clutter/clutter-gesture-action.c b/clutter/clutter/clutter-gesture-action.c index 9b5613bea..ab69bcf37 100644 --- a/clutter/clutter/clutter-gesture-action.c +++ b/clutter/clutter/clutter-gesture-action.c @@ -416,12 +416,10 @@ stage_captured_event_cb (ClutterActor *stage, return CLUTTER_EVENT_PROPAGATE; } + gesture_update_motion_point (point, event); + if (!begin_gesture (action, actor)) - { - if ((point = gesture_find_point (action, event, &position)) != NULL) - gesture_update_motion_point (point, event); - return CLUTTER_EVENT_PROPAGATE; - } + return CLUTTER_EVENT_PROPAGATE; if ((point = gesture_find_point (action, event, &position)) == NULL) return CLUTTER_EVENT_PROPAGATE; |