gesture swipe: Use GdkEvent API

This commit is contained in:
Matthias Clasen 2017-08-26 10:53:01 -04:00 committed by Carlos Garnacho
parent 1a8f0686ca
commit 5430751644

View File

@ -86,10 +86,13 @@ gtk_gesture_swipe_filter_event (GtkEventController *controller,
if (gdk_event_get_event_type (event) == GDK_TOUCHPAD_SWIPE)
{
guint n_points;
guint n_fingers;
g_object_get (G_OBJECT (controller), "n-points", &n_points, NULL);
if (event->touchpad_swipe.n_fingers == n_points)
gdk_event_get_touchpad_gesture_n_fingers (event, &n_fingers);
if (n_fingers == n_points)
return FALSE;
else
return TRUE;