You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[Bug] Windows 10: transparent always-on-top window sporadically renders transparent areas / desktop wallpaper black (composition race when toggling cursor events or minimizing) #15947
We ship a desktop-pet style game (transparent always-on-top window is its core form factor): a large (1440×900) transparent: true, alwaysOnTop: true, decorations: false, shadow: false window rendering a WebGL (PixiJS) scene on a transparent canvas (backgroundAlpha: 0), with HTML div UI on top. Because it is a desktop pet, we frequently toggle set_ignore_cursor_events() as the cursor moves in/out of the interactive region (a "cursor event guard": transparent areas of the window are click-through, the canvas area is interactive).
Players on Windows 10 report two sporadic rendering failures, both observed in player-recorded videos:
Desktop wallpaper turns black while the app is minimized, and restores when the window is brought back. The wallpaper file itself is never modified — purely a display failure that self-recovers with the window state change.
The window's transparent areas turn black during normal interaction (e.g. opening a UI panel, entering item-placement mode, moving the cursor across the canvas boundary) — exactly the moments our app toggles set_ignore_cursor_events().
Both are low-probability events under high-frequency triggers: the vast majority of toggles/minimizes render correctly.
Expected behavior
Transparent regions and the desktop wallpaper should stay correctly composed on Windows 10 when toggling set_ignore_cursor_events or minimizing/restoring a transparent always-on-top window.
Analysis (from reading tao 0.34.8 sources)
tao/src/platform_impl/windows/window.rs — when attributes.transparent && !pl_attribs.no_redirection_bitmap, tao enables the legacy DwmEnableBlurBehindWindow + empty-region (0, 0, -1, -1) hack for full-window transparency.
tao/src/platform_impl/windows/window_state.rs — set_ignore_cursor_events toggles WS_EX_TRANSPARENT | WS_EX_LAYERED via SetWindowLongPtr, forcing DWM to rebuild the composition tree (layered ⇄ direct composition path).
Our working model: BlurBehind hack + frequent WS_EX_LAYERED toggles (cursor guard) + minimize/restore of a large always-on-top transparent window occasionally race with DWM's composition-tree rebuild on Windows 10, losing either the window's alpha or the wallpaper layer (WorkerW) for a moment — the "black" being an invalid/uninitialized surface. We are still correlating occurrences with dwm.exe events in the Windows Event Log to determine whether DWM actually restarts or this is a non-crash composition failure, so the model above is our best current hypothesis rather than a confirmed root cause.
noRedirectionBitmap (WS_EX_NOREDIRECTIONBITMAP / DirectComposition path) looks like the structural fix for this class of issue: it sidesteps the BlurBehind hack entirely. Questions for maintainers:
OS: Windows 10 (player reports so far; exact builds + GPU/driver info being collected)
WebView2 runtime: affected machines' versions being collected
Frontend: PixiJS 8 WebGL canvas (backgroundAlpha: 0, preference: 'webgl'), HTML div UI coexisting in the same transparent window
Additional context
App: "PicoCat", a Steam desktop-pet / idle game.
We plan mitigations on our side (hide-to-tray instead of minimize; debouncing cursor-event toggles), but the underlying composition path seems worth flagging upstream.
Happy to provide player videos / Windows Event Log data once collected.
Describe the bug
We ship a desktop-pet style game (transparent always-on-top window is its core form factor): a large (1440×900)
transparent: true,alwaysOnTop: true,decorations: false,shadow: falsewindow rendering a WebGL (PixiJS) scene on a transparent canvas (backgroundAlpha: 0), with HTML div UI on top. Because it is a desktop pet, we frequently toggleset_ignore_cursor_events()as the cursor moves in/out of the interactive region (a "cursor event guard": transparent areas of the window are click-through, the canvas area is interactive).Players on Windows 10 report two sporadic rendering failures, both observed in player-recorded videos:
set_ignore_cursor_events().Both are low-probability events under high-frequency triggers: the vast majority of toggles/minimizes render correctly.
Expected behavior
Transparent regions and the desktop wallpaper should stay correctly composed on Windows 10 when toggling
set_ignore_cursor_eventsor minimizing/restoring a transparent always-on-top window.Analysis (from reading tao 0.34.8 sources)
tao/src/platform_impl/windows/window.rs— whenattributes.transparent && !pl_attribs.no_redirection_bitmap, tao enables the legacyDwmEnableBlurBehindWindow+ empty-region(0, 0, -1, -1)hack for full-window transparency.tao/src/platform_impl/windows/window_state.rs—set_ignore_cursor_eventstogglesWS_EX_TRANSPARENT | WS_EX_LAYEREDviaSetWindowLongPtr, forcing DWM to rebuild the composition tree (layered ⇄ direct composition path).Our working model: BlurBehind hack + frequent
WS_EX_LAYEREDtoggles (cursor guard) + minimize/restore of a large always-on-top transparent window occasionally race with DWM's composition-tree rebuild on Windows 10, losing either the window's alpha or the wallpaper layer (WorkerW) for a moment — the "black" being an invalid/uninitialized surface. We are still correlating occurrences withdwm.exeevents in the Windows Event Log to determine whether DWM actually restarts or this is a non-crash composition failure, so the model above is our best current hypothesis rather than a confirmed root cause.Relation to #15410
noRedirectionBitmap(WS_EX_NOREDIRECTIONBITMAP/ DirectComposition path) looks like the structural fix for this class of issue: it sidesteps the BlurBehind hack entirely. Questions for maintainers:set_ignore_cursor_eventsor minimizing transparent windows corrupts composition (black wallpaper / black transparent areas)? Possibly related: [bug] window effects leak out of the window on Windows 10 #12849, [bug] maximized window config causes black flash on launch #11284.Platform and Versions
backgroundAlpha: 0,preference: 'webgl'), HTML div UI coexisting in the same transparent windowAdditional context