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:
Carlos Garnacho 2022-08-05 10:50:45 +02:00
parent 6238f97cb6
commit bc953eebdd

View File

@ -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);
}