#13599·slint

Slint 1.18.1: software rendering fails again after long inactive window

Author: owuCreated Sep 23, 2026Updated Sep 28, 2026
Labelsneed triaging

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 https://github.com/slint-ui/slint/pull/13506 (and https://github.com/slint-ui/slint/issues/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.

  1. git clone -b repro/slint-upgrade-rendering-issue https://github.com/owu/wsl-dashboard && git checkout 76e592f9d5c8b2b9cd01bce42be6d4bd250961f4
  2. cargo build --release and run — main window renders correctly at startup.
  3. Leave the window inactive (e.g. covered by other windows) for ≈60–90 minutes.
  4. Click its taskbar icon to activate it → some elements are not painted.
  5. 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

  • Original issue: #13500; fix PR #13506 (commit 24df530e).
  • Project: a WSL management dashboard (slint + winit + tokio + tray-icon), single-window desktop app.
  • The app uses a custom reveal flow that persists 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)

slint

Environment Details

  • Slint Version:
  • Platform/OS:
  • Programming Language:
  • Backend/Renderer:

Product Impact

No response