From: Matthias Clasen Date: Sun, 9 Apr 2023 12:33:15 +0000 (-0400) Subject: gesture stylus: Fix condition X-Git-Tag: archive/raspbian/4.12.3+ds-1+rpi1~1^2^2^2~22^2~4^2~10^2~30 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=ec9b0ec8b4d87e85ba9580809dd544ddbc3a9667;p=gtk4.git gesture stylus: Fix condition Now that the paint demo lets us test this, it has become apparent that this condition is wrong, and we don't get the expected events if stylus-only is FALSE. --- diff --git a/gtk/gtkgesturestylus.c b/gtk/gtkgesturestylus.c index bc3da9351d..d2e2248e99 100644 --- a/gtk/gtkgesturestylus.c +++ b/gtk/gtkgesturestylus.c @@ -103,7 +103,7 @@ gtk_gesture_stylus_handle_event (GtkEventController *controller, priv = gtk_gesture_stylus_get_instance_private (GTK_GESTURE_STYLUS (controller)); GTK_EVENT_CONTROLLER_CLASS (gtk_gesture_stylus_parent_class)->handle_event (controller, event, x, y); - if (!(priv->stylus_only || gdk_event_get_device_tool (event))) + if (priv->stylus_only && !gdk_event_get_device_tool (event)) return FALSE; switch ((guint) gdk_event_get_event_type (event))