[libhandy] swipe-tracker: Reset the tracker after cancelling a gesture
- From: Adrien Plazas <aplazas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libhandy] swipe-tracker: Reset the tracker after cancelling a gesture
- Date: Thu, 29 Oct 2020 15:32:36 +0000 (UTC)
commit 9a94e3c2fc7a55fed7d97306a3f5ab662cd7c15d
Author: Alexander Mikhaylenko <alexm gnome org>
Date: Thu Oct 8 17:41:58 2020 +0500
swipe-tracker: Reset the tracker after cancelling a gesture
In particular, this prevents it from being stuck in the capture phase
after pressing a button without triggering a swipe.
src/hdy-swipe-tracker.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
---
diff --git a/src/hdy-swipe-tracker.c b/src/hdy-swipe-tracker.c
index a7bd0983..0646f1c0 100644
--- a/src/hdy-swipe-tracker.c
+++ b/src/hdy-swipe-tracker.c
@@ -298,8 +298,11 @@ gesture_cancel (HdySwipeTracker *self,
gdouble distance)
{
if (self->state != HDY_SWIPE_TRACKER_STATE_PENDING &&
- self->state != HDY_SWIPE_TRACKER_STATE_SCROLLING)
+ self->state != HDY_SWIPE_TRACKER_STATE_SCROLLING) {
+ reset (self);
+
return;
+ }
self->cancelled = TRUE;
gesture_end (self, distance);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]