mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-26 05:31:07 +00:00
gtkgesturerotate: Filter touchpad holds events
Since the pinch touchpad gestures already have begin/update/end phases, this gesture has no actual use for these events.
This commit is contained in:
parent
6238f97cb6
commit
bc953eebdd
@ -173,8 +173,7 @@ gtk_gesture_rotate_filter_event (GtkEventController *controller,
|
||||
GdkEvent *event)
|
||||
{
|
||||
/* Let 2-finger touchpad pinch and hold events go through */
|
||||
if (gdk_event_get_event_type (event) == GDK_TOUCHPAD_PINCH ||
|
||||
gdk_event_get_event_type (event) == GDK_TOUCHPAD_HOLD)
|
||||
if (gdk_event_get_event_type (event) == GDK_TOUCHPAD_PINCH)
|
||||
{
|
||||
guint n_fingers;
|
||||
|
||||
@ -185,6 +184,8 @@ gtk_gesture_rotate_filter_event (GtkEventController *controller,
|
||||
else
|
||||
return TRUE;
|
||||
}
|
||||
else if (gdk_event_get_event_type (event) == GDK_TOUCHPAD_HOLD)
|
||||
return TRUE;
|
||||
|
||||
return GTK_EVENT_CONTROLLER_CLASS (gtk_gesture_rotate_parent_class)->filter_event (controller, event);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user