forked from AuroraMiddleware/gtk
gtkgesture: ::cancel if a claimed sequence goes denied
The regular paths just emit ::end, which isn't the whole thing. This gives an opportunity to gestures that are stolen the sequence to clean themselves up.
This commit is contained in:
parent
883a43ddd7
commit
dc8adcda0e
@ -1014,6 +1014,10 @@ gtk_gesture_set_sequence_state (GtkGesture *gesture,
|
||||
data->state != GTK_EVENT_SEQUENCE_NONE)
|
||||
return FALSE;
|
||||
|
||||
if (state == GTK_EVENT_SEQUENCE_DENIED &&
|
||||
data->state == GTK_EVENT_SEQUENCE_CLAIMED)
|
||||
_gtk_gesture_cancel_sequence (gesture, sequence);
|
||||
|
||||
data->state = state;
|
||||
gtk_widget_cancel_event_sequence (gtk_event_controller_get_widget (GTK_EVENT_CONTROLLER (gesture)),
|
||||
gesture, sequence, state);
|
||||
|
Loading…
Reference in New Issue
Block a user