From 1808634f0e041ed1c85b69a967207c2cff812d81 Mon Sep 17 00:00:00 2001 From: mark9064 <30447455+mark9064@users.noreply.github.com> Date: Thu, 22 Aug 2024 16:53:18 +0100 Subject: Clear ongoing taps when going to sleep --- src/displayapp/DisplayApp.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/displayapp/DisplayApp.cpp') diff --git a/src/displayapp/DisplayApp.cpp b/src/displayapp/DisplayApp.cpp index 98a28258..5d33f76e 100644 --- a/src/displayapp/DisplayApp.cpp +++ b/src/displayapp/DisplayApp.cpp @@ -313,6 +313,10 @@ void DisplayApp::Refresh() { while (!lv_task_handler()) { }; } + // Clear any ongoing touch pressed events + // Without this LVGL gets stuck in the pressed state and will keep refreshing the + // display activity timer causing the screen to never sleep after timeout + lvgl.ClearTouchState(); if (msg == Messages::GoToAOD) { lcd.LowPowerOn(); // Record idle entry time -- cgit v1.2.3-70-g09d2