[gtk+/gtk-3-14] gesturesingle: Ignore motion/updates from unhandled sequences
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/gtk-3-14] gesturesingle: Ignore motion/updates from unhandled sequences
- Date: Mon, 13 Apr 2015 15:30:53 +0000 (UTC)
commit 52568346576974af321852e3a8ceef68d6808f98
Author: Carlos Garnacho <carlosg gnome org>
Date: Mon Apr 13 16:15:11 2015 +0200
gesturesingle: Ignore motion/updates from unhandled sequences
This used to do the right thing, practically ignoring those event
if they went all through the event handler, unless this motion event
triggered the cancellation of this gesture from the event handler
of another controllers.
In this case, the controller would be reset, but the motion event
would still go through its handler, setting again
current_button/sequence as the motion event has buttons in its
modifiers. This leaves GtkGestureSingle with inconsistent data
that may interfere with future runs.
https://bugzilla.gnome.org/show_bug.cgi?id=747469
gtk/gtkgesturesingle.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/gtk/gtkgesturesingle.c b/gtk/gtkgesturesingle.c
index 367d99c..36c5a2d 100644
--- a/gtk/gtkgesturesingle.c
+++ b/gtk/gtkgesturesingle.c
@@ -169,6 +169,8 @@ gtk_gesture_single_handle_event (GtkEventController *controller,
button = event->button.button;
break;
case GDK_MOTION_NOTIFY:
+ if (!gtk_gesture_handles_sequence (GTK_GESTURE (controller), sequence))
+ return FALSE;
if (priv->touch_only && !test_touchscreen && source != GDK_SOURCE_TOUCHSCREEN)
return FALSE;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]