summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarlos Garnacho <carlosg@gnome.org>2015-10-16 19:07:19 +0200
committerCarlos Garnacho <carlosg@gnome.org>2015-10-17 18:44:25 +0200
commit9753c9938239bdb2b102c56b496a76687f6d873a (patch)
treecd04cce54d8a8f9fc82c945fa380cb568e4764e9
parent9ea14ff949970ec1fb1464b053c132855768460f (diff)
downloadclutter-9753c9938239bdb2b102c56b496a76687f6d873a.tar.gz
click-action: Ignore motions/updates from different devices/sequences
Otherwise events from other devices or touch sequences might unintendedly trigger the thresholds, and a "cancelled" ::long-press with it. https://bugzilla.gnome.org/show_bug.cgi?id=756749
-rw-r--r--clutter/clutter-click-action.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/clutter/clutter-click-action.c b/clutter/clutter-click-action.c
index 92aba0b70..cd13da423 100644
--- a/clutter/clutter-click-action.c
+++ b/clutter/clutter-click-action.c
@@ -414,6 +414,10 @@ on_captured_event (ClutterActor *stage,
gfloat motion_x, motion_y;
gfloat delta_x, delta_y;
+ if (clutter_event_get_device_id (event) != priv->press_device_id ||
+ clutter_event_get_event_sequence (event) != priv->press_sequence)
+ return CLUTTER_EVENT_PROPAGATE;
+
if (!priv->is_held)
return CLUTTER_EVENT_PROPAGATE;