mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-11 11:20:12 +00:00
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:
parent
0b3f4d5555
commit
ced7e7c08d
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user