[gtk/wip/carlosg/input-cleanups: 1/26] gtkwidget: Cancel all gestures in other groups



commit 4fe608e4231f3c04a561220acf736d1128a770b3
Author: Carlos Garnacho <carlosg gnome org>
Date:   Fri Jun 19 18:50:51 2020 +0200

    gtkwidget: Cancel all gestures in other groups
    
    When a gesture (group) claims a sequence, all other gesture groups
    in the same widget should get cancelled. Not just previously claimed
    ones, that shouldn't happen actually.

 gtk/gtkwidget.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
---
diff --git a/gtk/gtkwidget.c b/gtk/gtkwidget.c
index 61ae38f0b5..8cb6a6c2f3 100644
--- a/gtk/gtkwidget.c
+++ b/gtk/gtkwidget.c
@@ -2178,8 +2178,7 @@ _gtk_widget_set_sequence_state_internal (GtkWidget             *widget,
           /* If a group is provided, ensure only gestures pertaining to the group
            * get a "claimed" state, all other claiming gestures must deny the sequence.
            */
-          if (gesture_state == GTK_EVENT_SEQUENCE_CLAIMED &&
-              gtk_gesture_get_sequence_state (gesture, sequence) == GTK_EVENT_SEQUENCE_CLAIMED)
+          if (state == GTK_EVENT_SEQUENCE_CLAIMED)
             gesture_state = GTK_EVENT_SEQUENCE_DENIED;
           else
             continue;


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