summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2012-02-26 00:04:39 -0500
committerMatthias Clasen <mclasen@redhat.com>2012-03-01 15:18:27 -0500
commitd6c1fd4ed409ab0f05864eea1f416776b5a1d4be (patch)
tree544619052695cc030096ae0f21ff58d6d70486a3
parenta32dee768014f95c70fbe989b8597f7f9523488f (diff)
downloadgtk+-d6c1fd4ed409ab0f05864eea1f416776b5a1d4be.tar.gz
gdk: Don't treat touch events as button events
One more place where we assumed that touch events have a button field.
-rw-r--r--gdk/gdkwindow.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/gdk/gdkwindow.c b/gdk/gdkwindow.c
index 6b56c81c96..4caf51d2c6 100644
--- a/gdk/gdkwindow.c
+++ b/gdk/gdkwindow.c
@@ -9978,6 +9978,9 @@ _gdk_windowing_got_event (GdkDisplay *display,
if (event->type == GDK_BUTTON_PRESS ||
event->type == GDK_BUTTON_RELEASE)
pointer_info->button = event->button.button;
+ else if (event->type == GDK_TOUCH_BEGIN ||
+ event->type == GDK_TOUCH_END)
+ pointer_info->button = 1;
if (device &&
(pointer_info->state != old_state ||