mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2025-01-14 06:10:21 +00:00
gtkgestureswipe: Don't filter hold events
Part-of: <!3454>
This commit is contained in:
parent
34133ec1e8
commit
fe86aa5f6b
@ -197,6 +197,10 @@ gtk_gesture_single_handle_event (GtkEventController *controller,
|
||||
}
|
||||
|
||||
break;
|
||||
case GDK_TOUCHPAD_HOLD:
|
||||
if (gdk_touchpad_event_get_n_fingers (event) == 1)
|
||||
return FALSE;
|
||||
/* fallthrough */
|
||||
case GDK_TOUCH_CANCEL:
|
||||
case GDK_GRAB_BROKEN:
|
||||
case GDK_TOUCHPAD_SWIPE:
|
||||
|
@ -84,8 +84,9 @@ static gboolean
|
||||
gtk_gesture_swipe_filter_event (GtkEventController *controller,
|
||||
GdkEvent *event)
|
||||
{
|
||||
/* Let touchpad swipe events go through, only if they match n-points */
|
||||
if (gdk_event_get_event_type (event) == GDK_TOUCHPAD_SWIPE)
|
||||
/* Let touchpad swipe and hold events go through, only if they match n-points */
|
||||
if (gdk_event_get_event_type (event) == GDK_TOUCHPAD_SWIPE ||
|
||||
gdk_event_get_event_type (event) == GDK_TOUCHPAD_HOLD)
|
||||
{
|
||||
guint n_points;
|
||||
guint n_fingers;
|
||||
|
Loading…
Reference in New Issue
Block a user