From c8dc7f486edbe4cdfa0e14bf308ed04e2dd3389a Mon Sep 17 00:00:00 2001 From: Kaj Schittecat Date: Tue, 13 Oct 2026 09:18:05 +0200 Subject: [PATCH] touch(home): the radar widget's tap opens the screensaver the way Settings' preview does hwRadarTap called ssaverStart() directly, which never marked the screen off, so loop() tore the saver down again on its next pass: a tap only flickered it and dipped the backlight to 40% for a frame. It now sets the same preview request as Settings, which starts it and marks the screen off, so it stays until a touch ends it. ssaverStart() also refuses a second start, so the dimmed 40% can never be saved as the user's brightness. Co-Authored-By: Claude Opus 5.5 --- src/ui-touch/UITask.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/ui-touch/UITask.cpp b/src/ui-touch/UITask.cpp index 71f81d7..49cc290 100644 --- a/src/ui-touch/UITask.cpp +++ b/src/ui-touch/UITask.cpp @@ -59009,7 +59009,7 @@ static void hwRadarDrawCb(lv_event_t* e) { lv_draw_rect(dc, &rd, &me); } static void hwRadarTimerCb(lv_timer_t*); -static void ssaverStart(uint32_t now, bool preview); // the screensaver, further down +static void ssaverRequestPreview(); // the screensaver, further down static void hwRadarBuild(int i) { HwInst& w = hwI(i); const int side = LV_MIN(w.pw, w.ph); @@ -59034,7 +59034,10 @@ static void hwRadarUpdate(int i) { setLabelIfChanged(w.l[1], s_hw_radar_geo ? "" : TR("by hops")); setLabelIfChanged(w.l[2], n); } -static void hwRadarTap(int, lv_event_t*) { ssaverStart(millis(), true); } +// Through the same request as Settings' preview: loop() starts it AND marks the +// screen off, so a touch ends it. Started here directly, _screen_off stayed false +// and loop() tore it down again on its next pass (the tap only flickered it). +static void hwRadarTap(int, lv_event_t*) { ssaverRequestPreview(); } #endif // ---- Compass (ThinkNode M9) ----------------------------------------------------------------- @@ -72046,6 +72049,7 @@ static void ssaverPoll(uint32_t now) { static UnderHidden s_ssaver_under; static void ssaverStart(uint32_t now, bool preview) { + if (s_ssaver_on) return; // a second start would save the dimmed 40% as the user's brightness CstTheme th; th.bg = COLOR_BG; th.accent = COLOR_ACCENT;