[mutter/gbsneto/cancel-input-actions] clutter/click-action: Make sure to never schedule more than one timeout



commit 6205f96a77ac22146b09996225270fd6930676f9
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date:   Wed Apr 8 15:48:09 2020 -0300

    clutter/click-action: Make sure to never schedule more than one timeout
    
    click_action_query_long_press() can potentially schedule more than
    one timeout, since it doesn't clear any already-existing timeout.
    
    Make sure to clear the long press timeout before scheduling a new
    one.

 clutter/clutter/clutter-click-action.c | 1 +
 1 file changed, 1 insertion(+)
---
diff --git a/clutter/clutter/clutter-click-action.c b/clutter/clutter/clutter-click-action.c
index 6e7ea9d01..0ff853df6 100644
--- a/clutter/clutter/clutter-click-action.c
+++ b/clutter/clutter/clutter-click-action.c
@@ -238,6 +238,7 @@ click_action_query_long_press (ClutterClickAction *action)
 
   if (result)
     {
+      g_clear_handle_id (&priv->long_press_id, g_source_remove);
       priv->long_press_id =
         clutter_threads_add_timeout (timeout,
                                      click_action_emit_long_press,


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