button: Make multipress gesture exclusive

We only want actions to be triggered by a single sequence there,
so buttons trigger no actions on further simultaneous touches
happening.
This commit is contained in:
Carlos Garnacho 2014-05-12 19:52:35 +02:00
parent 0b3f4d5555
commit ced7e7c08d

View File

@ -649,6 +649,7 @@ gtk_button_init (GtkButton *button)
priv->gesture = gtk_gesture_multi_press_new (GTK_WIDGET (button));
gtk_gesture_single_set_touch_only (GTK_GESTURE_SINGLE (priv->gesture), FALSE);
gtk_gesture_single_set_exclusive (GTK_GESTURE_SINGLE (priv->gesture), TRUE);
gtk_gesture_single_set_button (GTK_GESTURE_SINGLE (priv->gesture), GDK_BUTTON_PRIMARY);
g_signal_connect (priv->gesture, "pressed", G_CALLBACK (multipress_pressed_cb), button);
g_signal_connect (priv->gesture, "released", G_CALLBACK (multipress_released_cb), button);