diff --git a/gtk/gtkgesture.c b/gtk/gtkgesture.c index 1e425869b3..f0bb28421a 100644 --- a/gtk/gtkgesture.c +++ b/gtk/gtkgesture.c @@ -660,7 +660,7 @@ gtk_gesture_handle_event (GtkEventController *controller, (event_type == GDK_TOUCHPAD_SWIPE && phase == GDK_TOUCHPAD_GESTURE_PHASE_END) || (event_type == GDK_TOUCHPAD_PINCH && phase == GDK_TOUCHPAD_GESTURE_PHASE_END)) { - gboolean was_claimed; + gboolean was_claimed = FALSE; if (_gtk_gesture_update_point (gesture, event, target, x, y, FALSE)) { @@ -668,12 +668,12 @@ gtk_gesture_handle_event (GtkEventController *controller, _gtk_gesture_check_recognized (gesture, sequence)) g_signal_emit (gesture, signals[UPDATE], 0, sequence); + was_claimed = + gtk_gesture_get_sequence_state (gesture, sequence) == GTK_EVENT_SEQUENCE_CLAIMED; + _gtk_gesture_remove_point (gesture, event); } - was_claimed = - gtk_gesture_get_sequence_state (gesture, sequence) == GTK_EVENT_SEQUENCE_CLAIMED; - return was_claimed && was_recognized; } else if (event_type == GDK_MOTION_NOTIFY ||