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
This commit is contained in:
Carlos Garnacho 2020-08-05 22:57:08 +02:00
parent 36711b6691
commit bb3675b3c7

View File

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