Skip to content

Commit

Permalink
DisplayApp : Call the event handler of the current app before loading…
Browse files Browse the repository at this point in the history
… the new one. This way, we ensure that lv_task_handler() is called before sending event to the newly loaded app.
  • Loading branch information
JF002 committed Mar 28, 2022
1 parent a8b7fbe commit 4761fcb
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/displayapp/DisplayApp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 4761fcb

Please sign in to comment.