mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2025-01-10 04:30:11 +00:00
gtkgesturesingle: Unset button/sequence if parent handle_event failed
There are legit reasons for GtkGesture::handle_event to return FALSE, GtkGestureSingle objects should be unsetting the current button/sequence if that happens, in order to avoid inconsistent states. https://bugzilla.gnome.org/show_bug.cgi?id=738591
This commit is contained in:
parent
e46d23d819
commit
cfaec2d2f5
@ -220,6 +220,13 @@ gtk_gesture_single_handle_event (GtkEventController *controller,
|
||||
if (sequence == priv->current_sequence &&
|
||||
(event->type == GDK_BUTTON_RELEASE || event->type == GDK_TOUCH_END))
|
||||
priv->current_button = 0;
|
||||
else if (!retval)
|
||||
{
|
||||
if (button == priv->current_button && event->type == GDK_BUTTON_PRESS)
|
||||
priv->current_button = 0;
|
||||
else if (sequence == priv->current_sequence && event->type == GDK_TOUCH_BEGIN)
|
||||
priv->current_sequence = NULL;
|
||||
}
|
||||
|
||||
return retval;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user