From 427077fa783752cab424f0cdd7c14fd7e0a60bde Mon Sep 17 00:00:00 2001 From: Devin Lin Date: Tue, 3 Oct 2023 22:47:08 -0700 Subject: [PATCH] swipearea: Fix release when not in swipe --- components/mobileshell/components/swipearea.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/components/mobileshell/components/swipearea.cpp b/components/mobileshell/components/swipearea.cpp index 879cfcb7..38ad16df 100644 --- a/components/mobileshell/components/swipearea.cpp +++ b/components/mobileshell/components/swipearea.cpp @@ -249,8 +249,11 @@ void SwipeArea::handlePressEvent(QPointerEvent *event, QPointF point) void SwipeArea::handleReleaseEvent(QPointerEvent *event, QPointF point) { + // if we are in a swipe + if (m_moving) { + Q_EMIT swipeEnded(); + } resetSwipe(); - Q_EMIT swipeEnded(); } void SwipeArea::handleMoveEvent(QPointerEvent *event, QPointF point)