Commit f8bc56dd authored by Carlos Garnacho's avatar Carlos Garnacho

gtkgesture: Consume button release/touch end events if gesture was claimed

In these situations we must perform the "is it claimed" check before removing
the (touch)point, as doing so when the gesture is empty will be too late if
the gesture actually claimed input.
parent 8371b6b8
......@@ -693,6 +693,11 @@ gtk_gesture_handle_event (GtkEventController *controller,
(event->type == GDK_TOUCHPAD_PINCH &&
event->touchpad_pinch.phase == GDK_TOUCHPAD_GESTURE_PHASE_END))
gboolean was_claimed;
was_claimed =
gtk_gesture_get_sequence_state (gesture, sequence) == GTK_EVENT_SEQUENCE_CLAIMED;
if (_gtk_gesture_update_point (gesture, event, FALSE))
if (was_recognized &&
......@@ -701,6 +706,8 @@ gtk_gesture_handle_event (GtkEventController *controller,
_gtk_gesture_remove_point (gesture, event);
return was_claimed && was_recognized;
else if (event->type == GDK_MOTION_NOTIFY ||
event->type == GDK_TOUCH_UPDATE ||
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment