From bb3675b3c7e2589a6e50acc56c834e0710e53000 Mon Sep 17 00:00:00 2001 From: Carlos Garnacho Date: Wed, 5 Aug 2020 22:57:08 +0200 Subject: [PATCH] gtkspinbutton: Claim button gestures when starting to spin The gesture should be acknowledged by the spin button, in order to guarantee it will also receive the button release. Fixes: https://gitlab.gnome.org/GNOME/gtk/-/issues/3016 --- gtk/gtkspinbutton.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gtk/gtkspinbutton.c b/gtk/gtkspinbutton.c index 01466dda23..0927efba90 100644 --- a/gtk/gtkspinbutton.c +++ b/gtk/gtkspinbutton.c @@ -851,6 +851,8 @@ button_pressed_cb (GtkGestureClick *gesture, start_spinning (spin_button, pressed_button, gtk_adjustment_get_step_increment (spin_button->adjustment)); else if (button == GDK_BUTTON_MIDDLE) start_spinning (spin_button, pressed_button, gtk_adjustment_get_page_increment (spin_button->adjustment)); + + gtk_gesture_set_state (GTK_GESTURE (gesture), GTK_EVENT_SEQUENCE_CLAIMED); } else {