[gtk+/multitouch: 21/129] gtk: Handle press-and-hold for touch devices
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/multitouch: 21/129] gtk: Handle press-and-hold for touch devices
- Date: Sat, 18 Feb 2012 17:08:04 +0000 (UTC)
commit 68587c203c6ca8dbb245dce30e23f7cbf0a9acee
Author: Carlos Garnacho <carlosg gnome org>
Date: Tue Nov 1 12:36:18 2011 +0100
gtk: Handle press-and-hold for touch devices
Also, only react to the first button
gtk/gtkwidget.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/gtk/gtkwidget.c b/gtk/gtkwidget.c
index 876e228..6c3d919 100644
--- a/gtk/gtkwidget.c
+++ b/gtk/gtkwidget.c
@@ -6018,7 +6018,9 @@ _gtk_widget_captured_event (GtkWidget *widget,
g_object_ref (widget);
- if (event->type == GDK_BUTTON_PRESS)
+ if ((event->type == GDK_BUTTON_PRESS ||
+ event->type == GDK_TOUCH_PRESS) &&
+ event->button.button == 1)
{
/* Handle press and hold */
gtk_widget_press_and_hold_start (widget,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]