[gtk/wip/carlosg/fixes: 4/8] gtkgesturerotate: Filter touchpad holds events
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/wip/carlosg/fixes: 4/8] gtkgesturerotate: Filter touchpad holds events
- Date: Sat, 6 Aug 2022 00:01:05 +0000 (UTC)
commit 15e0c175a33a1ead70511174bc308e1809fe7843
Author: Carlos Garnacho <carlosg gnome org>
Date: Fri Aug 5 10:53:22 2022 +0200
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.
gtk/gtkgesturezoom.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/gtk/gtkgesturezoom.c b/gtk/gtkgesturezoom.c
index 9d6116bce1..e60ea3ace8 100644
--- a/gtk/gtkgesturezoom.c
+++ b/gtk/gtkgesturezoom.c
@@ -150,8 +150,7 @@ gtk_gesture_zoom_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;
@@ -162,6 +161,8 @@ gtk_gesture_zoom_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_zoom_parent_class)->filter_event (controller, event);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]