mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-27 06:00:22 +00:00
window: Reset on unhandled gestures right away
Traditionally a sequence is set to GTK_EVENT_SEQUENCE_DENIED state when it is to be ignored, which means it is dormant, but still managed by the gesture (accounting, "denied" sequences still make "slots" in multitouch gesture busy, etc...). This gesture will run for all button presses and releases in the window though when presses happen on the "window content" region, and we can't account for every children to be as educated as setting the proper mask on every window, or ensuring events will be propagated as they should. In order to cater for this, just reset the gestures, we can live without such accounting in these specific GtkGestureSingle gestures. https://bugzilla.gnome.org/show_bug.cgi?id=754098
This commit is contained in:
parent
15d043c5d2
commit
e3bd895667
@ -61,6 +61,7 @@
|
||||
#include "a11y/gtkwindowaccessible.h"
|
||||
#include "a11y/gtkcontaineraccessibleprivate.h"
|
||||
#include "gtkapplicationprivate.h"
|
||||
#include "gtkgestureprivate.h"
|
||||
#include "inspector/init.h"
|
||||
#include "inspector/window.h"
|
||||
|
||||
@ -1450,6 +1451,14 @@ multipress_gesture_pressed_cb (GtkGestureMultiPress *gesture,
|
||||
{
|
||||
gtk_gesture_set_sequence_state (GTK_GESTURE (gesture),
|
||||
sequence, GTK_EVENT_SEQUENCE_DENIED);
|
||||
|
||||
/* Reset immediately the gestures, here we don't get many guarantees
|
||||
* about whether the target window event mask will be complete enough
|
||||
* to keep gestures consistent, or whether any widget across the
|
||||
* hierarchy will be inconsistent about event handler return values.
|
||||
*/
|
||||
gtk_event_controller_reset (GTK_EVENT_CONTROLLER (gesture));
|
||||
gtk_event_controller_reset (GTK_EVENT_CONTROLLER (priv->drag_gesture));
|
||||
return;
|
||||
}
|
||||
/* fall thru */
|
||||
|
Loading…
Reference in New Issue
Block a user