[gtk+/gestures: 27/92] gesture: Skip non-device events early.
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/gestures: 27/92] gesture: Skip non-device events early.
- Date: Tue, 8 Apr 2014 19:42:41 +0000 (UTC)
commit 0933b562d78a9a32f0419608e64d1d535728361c
Author: Carlos Garnacho <carlosg gnome org>
Date: Fri Mar 21 17:17:42 2014 +0100
gesture: Skip non-device events early.
gtk/gtkgesture.c | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/gtk/gtkgesture.c b/gtk/gtkgesture.c
index adccc87..71d9b0e 100644
--- a/gtk/gtkgesture.c
+++ b/gtk/gtkgesture.c
@@ -322,8 +322,14 @@ gtk_gesture_handle_event (GtkEventController *controller,
GtkGesture *gesture = GTK_GESTURE (controller);
GdkEventSequence *sequence;
GtkGesturePrivate *priv;
+ GdkDevice *source_device;
gboolean was_recognized;
+ source_device = gdk_event_get_source_device (event);
+
+ if (!source_device)
+ return FALSE;
+
priv = gtk_gesture_get_instance_private (gesture);
sequence = gdk_event_get_event_sequence (event);
priv->last_sequence = sequence;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]