summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJean-François Milants <jf@codingfield.com>2022-03-27 20:29:52 +0200
committerJF <JF002@users.noreply.github.com>2022-03-28 21:12:25 +0200
commit4761fcb63a55749c5e46c5fe6bb53ae25b4716c8 (patch)
tree318547a6fa6c970f40e5407231952452af7ff3e4
parenta8b7fbe48b4a86238f38ed0f084b277b44c428fb (diff)
DisplayApp : Call the event handler of the current app before loading the new one. This way, we ensure that lv_task_handler() is called before sending event to the newly loaded app.
-rw-r--r--src/displayapp/DisplayApp.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/displayapp/DisplayApp.cpp b/src/displayapp/DisplayApp.cpp
index fdc6376c..c8429563 100644
--- a/src/displayapp/DisplayApp.cpp
+++ b/src/displayapp/DisplayApp.cpp
@@ -306,14 +306,14 @@ void DisplayApp::Refresh() {
}
}
+ if (touchHandler.IsTouching()) {
+ currentScreen->OnTouchEvent(touchHandler.GetX(), touchHandler.GetY());
+ }
+
if (nextApp != Apps::None) {
LoadApp(nextApp, nextDirection);
nextApp = Apps::None;
}
-
- if (touchHandler.IsTouching()) {
- currentScreen->OnTouchEvent(touchHandler.GetX(), touchHandler.GetY());
- }
}
void DisplayApp::StartApp(Apps app, DisplayApp::FullRefreshDirections direction) {