[mutter/wip/carlosg/app-grid-gestures: 14/15] clutter: Update ClutterGestureAction point position before ::prepare
- From: Marge Bot <marge-bot src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter/wip/carlosg/app-grid-gestures: 14/15] clutter: Update ClutterGestureAction point position before ::prepare
- Date: Tue, 23 Mar 2021 18:05:10 +0000 (UTC)
commit b0a0be3ccc113de447ab5019e325552c4cb5b1d5
Author: Carlos Garnacho <carlosg gnome org>
Date: Thu Mar 18 18:36:37 2021 +0100
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>
clutter/clutter/clutter-gesture-action.c | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
---
diff --git a/clutter/clutter/clutter-gesture-action.c b/clutter/clutter/clutter-gesture-action.c
index 9b5613bea5..ab69bcf37f 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;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]