gtk: Handle press-and-hold for touch devices

Also, only react to the first button
This commit is contained in:
Carlos Garnacho
2011-11-01 12:36:18 +01:00
parent 80e08d1b1b
commit 68587c203c

View File

@@ -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,