Repository navigation
feat: add "On desktop" overlay layer that survives Show Desktop - #78
Conversation
The 'bottom' layer disappears on Show Desktop / Win+D because Explorer raises the desktop-icons host (Progman on 24H2+) above every normal window. The 'wallpaper' layer survives it but sits under SHELLDLL_DefView, so interactive widgets stop receiving clicks. Add a 'desktop' layer modelled on Rainmeter's ZPOSITION_ONDESKTOP: - desktop_layer.rs keeps a hidden sentinel window parked at HWND_BOTTOM; the icon host rising above it means the desktop is being shown. A foreground WinEvent hook plus a 250/100 ms timer drive the check. - While shown, registered overlays are slotted under the backmost topmost window (above the icons, below the taskbar) with SWP_NOSENDCHANGING, which bypasses tao's always-on-bottom WM_WINDOWPOSCHANGING rewrite. On leaving they return to HWND_BOTTOM. - Overlays stay ordinary top-level windows, so per-widget click-through keeps working. - Studio Settings gains the "On desktop" window-layer option. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
AI-generated review and release follow-up, posted by Codex at the repository owner's request. Thanks @naessenskjell for contributing the On desktop layer. PR #78 is merged, and you are credited in README Contributors and the v0.0.71 release notes. Follow-up fixes in #79:
Verification: 4,698 frontend tests with 100% coverage; 126 Playwright tests; 451 Rust tests, plus the explicitly invoked native smoke; typecheck, lint, build, rustfmt, and clippy passed. The native Win+D test passed on Windows 11 25H2 (26200.9445) across three connected monitors, checking placement above icons, native input hit testing, and restoration afterward. It uses temporary Win32 windows, so it does not establish every real WebView widget interaction; older Windows shells were not tested. No known medium-or-higher issues remain from this review. Released in v0.0.71, with the Windows installer attached and build provenance verified. |
Problem
With the default "Below windows" layer, Show Desktop / Win+D hides every widget: Explorer raises the desktop-icons host (Progman on 24H2+) above all normal windows. "Behind desktop icons" survives Show Desktop, but its widgets sit under SHELLDLL_DefView, so they can't be clicked.
Approach
A new opt-in layer, Settings → window layer → On desktop. The default is unchanged. It ports Rainmeter's "On desktop" mode (System.cpp,
CheckDesktopState/PrepareHelperWindow):HWND_BOTTOM. If the icon host moves above it, Show Desktop is active. A foreground WinEvent hook triggers the check, with a 250 ms timer as fallback (100 ms while shown).SWP_NOSENDCHANGINGso that tao's always-on-bottomWM_WINDOWPOSCHANGINGrewrite doesn't undo it. Afterwards they return toHWND_BOTTOM.Testing
Windows 11 25H2 (build 26200), single monitor, using
Shell.Application.ToggleDesktop():Checks:
cargo clippyclean,cargo test(4 new tests for the decision logic),npm run check,npm run lint, and unit tests. TwoAiUsagetests fail, but they also fail on unmodifiedmain.Not tested: Windows before 24H2, multiple monitors, [clicking widgets during Show Desktop].
Written with help from Claude (Claude Code); the commit carries a
Co-Authored-Bytrailer.