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.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1791>
This commit is contained in:
Carlos Garnacho 2021-03-18 18:36:37 +01:00 committed by Marge Bot
parent 0e97c0550e
commit b0a0be3ccc

View File

@ -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;