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.

This commit is contained in:
Jean-François Milants 2022-03-27 20:29:52 +02:00 committed by JF
parent a8b7fbe48b
commit 4761fcb63a

View file

@ -306,14 +306,14 @@ void DisplayApp::Refresh() {
} }
} }
if (touchHandler.IsTouching()) {
currentScreen->OnTouchEvent(touchHandler.GetX(), touchHandler.GetY());
}
if (nextApp != Apps::None) { if (nextApp != Apps::None) {
LoadApp(nextApp, nextDirection); LoadApp(nextApp, nextDirection);
nextApp = Apps::None; nextApp = Apps::None;
} }
if (touchHandler.IsTouching()) {
currentScreen->OnTouchEvent(touchHandler.GetX(), touchHandler.GetY());
}
} }
void DisplayApp::StartApp(Apps app, DisplayApp::FullRefreshDirections direction) { void DisplayApp::StartApp(Apps app, DisplayApp::FullRefreshDirections direction) {