[mutter] clutter/click-action: Release if motion crosses drag threshold



commit 2c57f0986a4bb5e5f77ecc9462a92b2380e0d18a
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date:   Mon Jan 11 15:29:50 2021 -0300

    clutter/click-action: Release if motion crosses drag threshold
    
    When the drag threshold is crossed while the click action is pressed,
    release it. This way, we can avoid spurious "clicked" signals from
    being emitted.
    
    Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1667>

 clutter/clutter/clutter-click-action.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/clutter/clutter/clutter-click-action.c b/clutter/clutter/clutter-click-action.c
index bd94d91051..45d87e809d 100644
--- a/clutter/clutter/clutter-click-action.c
+++ b/clutter/clutter/clutter-click-action.c
@@ -435,7 +435,7 @@ on_captured_event (ClutterActor       *stage,
           return CLUTTER_EVENT_PROPAGATE;
 
         if (!event_within_drag_threshold (action, event))
-          click_action_cancel_long_press (action);
+          clutter_click_action_release (action);
       }
       break;
 


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