Backup and restore vertical scroll offset when goind to sleep/wakeup to avoid scrambled display on wake-up.

This commit is contained in:
JF
2020-03-11 21:35:06 +01:00
parent b279c99488
commit a91c68c931
4 changed files with 12 additions and 9 deletions

View File

@@ -132,13 +132,13 @@ void DisplayApp::Refresh() {
break;
case Messages::ButtonPushed:
if(onClockApp)
systemTask.PushMessage(System::SystemTask::Messages::GoToSleep);
else {
auto buttonUsedByApp = currentScreen->OnButtonPushed();
if (!buttonUsedByApp) {
systemTask.PushMessage(System::SystemTask::Messages::GoToSleep);
} else {
lvgl.SetFullRefresh(Components::LittleVgl::FullRefreshDirections::Up);
else {
auto buttonUsedByApp = currentScreen->OnButtonPushed();
if (!buttonUsedByApp) {
systemTask.PushMessage(System::SystemTask::Messages::GoToSleep);
} else {
lvgl.SetFullRefresh(Components::LittleVgl::FullRefreshDirections::Up);
}
}