[libhandy] swipe-tracker: Don't switch to capture phase when not necessary
- From: Alexander Mikhaylenko <alexm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libhandy] swipe-tracker: Don't switch to capture phase when not necessary
- Date: Wed, 11 Nov 2020 11:54:51 +0000 (UTC)
commit 2afa46f6e7a5064adbf2e5a72c448eb0a6804838
Author: Alexander Mikhaylenko <exalm7659 gmail com>
Date: Sun Nov 1 13:45:46 2020 +0500
swipe-tracker: Don't switch to capture phase when not necessary
Only switch to the capture phase when the sequence is going to be actually
handled.
Fixes https://gitlab.gnome.org/GNOME/libhandy/-/issues/359
src/hdy-swipe-tracker.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/src/hdy-swipe-tracker.c b/src/hdy-swipe-tracker.c
index 816b81ae..86e7fd7f 100644
--- a/src/hdy-swipe-tracker.c
+++ b/src/hdy-swipe-tracker.c
@@ -666,9 +666,11 @@ captured_event_cb (HdySwipeable *swipeable,
if (!self->use_capture_phase && !should_force_drag (self, widget))
return GDK_EVENT_PROPAGATE;
- self->use_capture_phase = TRUE;
-
sequence = gdk_event_get_event_sequence (event);
+
+ if (gtk_gesture_handles_sequence (self->touch_gesture, sequence))
+ self->use_capture_phase = TRUE;
+
retval = gtk_event_controller_handle_event (GTK_EVENT_CONTROLLER (self->touch_gesture), event);
state = gtk_gesture_get_sequence_state (self->touch_gesture, sequence);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]