From ff35b895431ba832d7a7a74c0f9c4618377ba5f7 Mon Sep 17 00:00:00 2001 From: Raphael Coeffic Date: Thu, 27 May 2021 22:27:58 +0200 Subject: [PATCH] Reset touch state before calling onTouchEnd() In case something calls MainWindow::run() during the execution of this handler. Otherwise it will generate a second touch-end event, on whatever is on the screen at this moment. --- radio/src/thirdparty/libopenui/src/mainwindow.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/radio/src/thirdparty/libopenui/src/mainwindow.cpp b/radio/src/thirdparty/libopenui/src/mainwindow.cpp index d535fdafc..7cbe46111 100644 --- a/radio/src/thirdparty/libopenui/src/mainwindow.cpp +++ b/radio/src/thirdparty/libopenui/src/mainwindow.cpp @@ -51,8 +51,8 @@ void MainWindow::checkEvents() slidingWindow = nullptr; } else if (touchState.event == TE_UP) { - onTouchEnd(touchState.startX + scrollPositionX, touchState.startY + scrollPositionY); touchState.event = TE_NONE; + onTouchEnd(touchState.startX + scrollPositionX, touchState.startY + scrollPositionY); } else if (touchState.event == TE_SLIDE) { if (touchState.deltaX || touchState.deltaY) {