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.
This commit is contained in:
Carlos Garnacho 2020-06-19 18:50:51 +02:00
parent 2cfeb1048c
commit 4fe608e423

View File

@ -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;