[gtk/wip/carlosg/cancelled-gestures: 1/2] gtkwidget: Do not check event sequence state before cancelling gesture
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/wip/carlosg/cancelled-gestures: 1/2] gtkwidget: Do not check event sequence state before cancelling gesture
- Date: Mon, 15 Nov 2021 23:50:35 +0000 (UTC)
commit 615b8fc5696ab2942352fe6f0e8979ec6204c921
Author: Carlos Garnacho <carlosg gnome org>
Date: Mon Nov 15 23:39:48 2021 +0100
gtkwidget: Do not check event sequence state before cancelling gesture
The sequence should be cancelled from the gesture despite its current state.
Also, there was a piece of pointer emulation that was not dropped here,
maybe breaking things further for the pointer emulated touchpoint.
Fixes: https://gitlab.gnome.org/GNOME/gtk/-/issues/4387
gtk/gtkwidget.c | 14 +-------------
1 file changed, 1 insertion(+), 13 deletions(-)
---
diff --git a/gtk/gtkwidget.c b/gtk/gtkwidget.c
index 907e2004f2..788cfb6650 100644
--- a/gtk/gtkwidget.c
+++ b/gtk/gtkwidget.c
@@ -2289,19 +2289,14 @@ _gtk_widget_cancel_sequence (GtkWidget *widget,
GdkEventSequence *sequence)
{
GtkWidgetPrivate *priv = gtk_widget_get_instance_private (widget);
- gboolean emulates_pointer;
gboolean handled = FALSE;
- GdkEventSequence *seq;
GList *l;
- emulates_pointer = _gtk_widget_get_emulating_sequence (widget, sequence, &seq);
-
for (l = priv->event_controllers; l; l = l->next)
{
GtkEventController *controller;
GtkGesture *gesture;
- seq = sequence;
controller = l->data;
if (!GTK_IS_GESTURE (controller))
@@ -2309,14 +2304,7 @@ _gtk_widget_cancel_sequence (GtkWidget *widget,
gesture = GTK_GESTURE (controller);
- if (seq && emulates_pointer &&
- !gtk_gesture_handles_sequence (gesture, seq))
- seq = NULL;
-
- if (!gtk_gesture_handles_sequence (gesture, seq))
- continue;
-
- handled |= _gtk_gesture_cancel_sequence (gesture, seq);
+ handled |= _gtk_gesture_cancel_sequence (gesture, sequence);
}
return handled;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]