Bug Description
[1.18.1] Software rendering (renderer-skia + "skia-software"): UI not painted after the window is re-activated following a long idle/occluded period; a theme toggle fixes it
Summary
Follow-up to #13506 (and #13500).
1.18.1 fixed the cold-start bug (#13500). But a closely related issue remains: if the main window is left inactive/occluded for ≈60 min–90 min and then re-activated via its taskbar icon, some UI elements are not rendered (same symptom as the 1.18.0 startup bug). Toggling the dark/light theme once restores everything.
Environment
- OS: Windows 10 Pro (2009, build 10.0.26100.1); English
- slint 1.18.1; features
["backend-winit", "renderer-skia"]; release; windows_subsystem = "windows"
- Software renderer:
BackendSelector::renderer_name("skia-software")
Steps to reproduce
Reproduction code: https://github.com/owu/wsl-dashboard, branch repro/slint-upgrade-rendering-issue,
commit 76e592f9d5c8b2b9cd01bce42be6d4bd250961f4.
git clone -b repro/slint-upgrade-rendering-issue https://github.com/owu/wsl-dashboard && git checkout 76e592f9d5c8b2b9cd01bce42be6d4bd250961f4
cargo build --release and run — main window renders correctly at startup.
- Leave the window inactive (e.g. covered by other windows) for ≈60–90 minutes.
- Click its taskbar icon to activate it → some elements are not painted.
- Toggle dark/light theme once → the whole UI appears.
Expected behavior
The window should be fully painted when re-activated (as on 1.17.1 / 1.18.1 at startup).
Actual behavior
After a long inactive period, re-activating leaves some regions unpainted until a theme switch forces a full repaint.
Root cause (brief)
#13506 only marks the whole window dirty right after the first set_visible(true). Software rendering uses buffer-age driven partial rendering (internal/renderers/skia/lib.rs): it repaints only currently-dirty regions and assumes earlier frame pixels are still on screen.
When the compositor/DWM discards the window surface during a long inactive period, but the software surface still reports buffer_age == 1, Slint thinks the previous frame is intact and skips repainting the lost regions. Reactivation via taskbar produces no Resized and, on Windows, often no reliable Occluded event — and for skia, occluded() is the default no-op (internal/backends/winit/lib.rs), so nothing forces a full repaint.
A theme toggle invalidates the whole scene, which confirms the regions are simply not being redrawn.
In short: #13506 fixed only the first mapping; the same buffer-age desync recurs whenever a window whose surface was discarded is shown again. The fix should also force a full repaint on re-activation/restore (at least for buffer-age-based software surfaces on Windows).
Additional context
Reproducible Code (if applicable)
Environment Details
- Slint Version:
- Platform/OS:
- Programming Language:
- Backend/Renderer:
Product Impact
No response
Bug Description
[1.18.1] Software rendering (renderer-skia + "skia-software"): UI not painted after the window is re-activated following a long idle/occluded period; a theme toggle fixes it
Summary
Follow-up to #13506 (and #13500).
1.18.1 fixed the cold-start bug (#13500). But a closely related issue remains: if the main window is left inactive/occluded for ≈60 min–90 min and then re-activated via its taskbar icon, some UI elements are not rendered (same symptom as the 1.18.0 startup bug). Toggling the dark/light theme once restores everything.
Environment
["backend-winit", "renderer-skia"]; release;windows_subsystem = "windows"BackendSelector::renderer_name("skia-software")Steps to reproduce
Reproduction code: https://github.com/owu/wsl-dashboard, branch
repro/slint-upgrade-rendering-issue,commit
76e592f9d5c8b2b9cd01bce42be6d4bd250961f4.git clone -b repro/slint-upgrade-rendering-issue https://github.com/owu/wsl-dashboard&&git checkout 76e592f9d5c8b2b9cd01bce42be6d4bd250961f4cargo build --releaseand run — main window renders correctly at startup.Expected behavior
The window should be fully painted when re-activated (as on 1.17.1 / 1.18.1 at startup).
Actual behavior
After a long inactive period, re-activating leaves some regions unpainted until a theme switch forces a full repaint.
Root cause (brief)
#13506 only marks the whole window dirty right after the first
set_visible(true). Software rendering uses buffer-age driven partial rendering (internal/renderers/skia/lib.rs): it repaints only currently-dirty regions and assumes earlier frame pixels are still on screen.When the compositor/DWM discards the window surface during a long inactive period, but the software surface still reports
buffer_age == 1, Slint thinks the previous frame is intact and skips repainting the lost regions. Reactivation via taskbar produces noResizedand, on Windows, often no reliableOccludedevent — and for skia,occluded()is the default no-op (internal/backends/winit/lib.rs), so nothing forces a full repaint.A theme toggle invalidates the whole scene, which confirms the regions are simply not being redrawn.
In short: #13506 fixed only the first mapping; the same buffer-age desync recurs whenever a window whose surface was discarded is shown again. The fix should also force a full repaint on re-activation/restore (at least for buffer-age-based software surfaces on Windows).
Additional context
24df530e).WS_EX_LAYERED; this may make DWM discard the surface more readily, but the bug is a general partial-rendering desync and should reproduce on the attached commit by simply leaving the window inactive.Reproducible Code (if applicable)
Environment Details
Product Impact
No response