Skip to content

Commit 4761fcb

Browse files
committed
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.
1 parent a8b7fbe commit 4761fcb

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

src/displayapp/DisplayApp.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -306,14 +306,14 @@ void DisplayApp::Refresh() {
306306
}
307307
}
308308

309+
if (touchHandler.IsTouching()) {
310+
currentScreen->OnTouchEvent(touchHandler.GetX(), touchHandler.GetY());
311+
}
312+
309313
if (nextApp != Apps::None) {
310314
LoadApp(nextApp, nextDirection);
311315
nextApp = Apps::None;
312316
}
313-
314-
if (touchHandler.IsTouching()) {
315-
currentScreen->OnTouchEvent(touchHandler.GetX(), touchHandler.GetY());
316-
}
317317
}
318318

319319
void DisplayApp::StartApp(Apps app, DisplayApp::FullRefreshDirections direction) {

0 commit comments

Comments
 (0)