[clutter] click-action: Ignore motions/updates from different devices/sequences



commit 9753c9938239bdb2b102c56b496a76687f6d873a
Author: Carlos Garnacho <carlosg gnome org>
Date:   Fri Oct 16 19:07:19 2015 +0200

    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

 clutter/clutter-click-action.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/clutter/clutter-click-action.c b/clutter/clutter-click-action.c
index 92aba0b..cd13da4 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;
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]