[gtk+/touchscreens: 21/49] gtk: Handle press-and-hold for touch devices
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/touchscreens: 21/49] gtk: Handle press-and-hold for touch devices
- Date: Mon, 5 Dec 2011 01:16:44 +0000 (UTC)
commit c1b5562f817fe0482fc5fff512b518601d5bcb82
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 c518544..e222e34 100644
--- a/gtk/gtkwidget.c
+++ b/gtk/gtkwidget.c
@@ -5993,7 +5993,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]