Problem
When different WinDynamicDesktop themes are assigned to multiple physical displays, WDD calls IDesktopWallpaper.SetWallpaper once per monitor. On Windows 11, switching virtual desktops can restore a stale single-image wallpaper for that desktop, so one image is temporarily or permanently shown on both monitors until WDD refreshes the current desktop.
I reproduced this with:
- Windows 11 build 26200
- WinDynamicDesktop 5.7.0 desktop/portable build
- two 3840x2160 displays at 150% scaling
- different Big Sur and Catalina themes on the two displays
- nine Windows virtual desktops
Calling /refresh after every desktop switch reduces the visible error but introduces a second problem: rapid switches can overlap scheduler work. In my test this caused EventScheduler.Run to throw NullReferenceException and terminate WDD.
Proposed opt-in behavior
Add an experimental option for users who combine per-display themes with Windows 11 virtual desktops:
- Use
IDesktopWallpaper.GetMonitorDevicePathAt(index) and GetMonitorRECT so the image index and physical monitor coordinates come from the same API WDD already uses.
- Compose the current per-display images into one native-resolution virtual-screen bitmap. This naturally supports negative coordinates, left/right or vertical layouts, different resolutions, and DPI scaling because
GetMonitorRECT returns physical pixel bounds.
- Preserve the effective per-monitor wallpaper layout while rendering each source image into its monitor rectangle.
- Set Windows wallpaper position to
Span and assign the same composite path to every Windows virtual desktop before the user switches.
- Cache by image paths, timestamps, layout, and render mode, and replace output files atomically.
This changes the state Windows must persist from “one path per virtual desktop per physical display” (which Windows 11 does not reliably retain) to one supported composite path per virtual desktop. It also avoids any post-switch WDD refresh.
Compatibility and scope
I found the v5.1 changelog note and commit 786be9b, which removed virtual-desktop synchronization because the API was too experimental and directed users to the SyncVirtualDesktops script. I suggest keeping the new behavior:
- disabled by default;
- clearly marked experimental;
- Windows 11 desktop builds only if Store restrictions make it unsuitable there;
- isolated behind a small abstraction so unsupported Windows builds fail closed and leave existing per-monitor behavior unchanged;
- reversible, restoring the previous wallpaper position when disabled.
The existing script only supports one image across all monitors. The proposed compositor handles different images and arbitrary monitor topology.
Would this opt-in design be acceptable for a draft PR, and is the current VirtualDesktop package still the preferred integration point for updating every desktop?
Related: #321 and the experimental SyncVirtualDesktops.ps1 in t1m0thyj/WDD-scripts.
Problem
When different WinDynamicDesktop themes are assigned to multiple physical displays, WDD calls
IDesktopWallpaper.SetWallpaperonce per monitor. On Windows 11, switching virtual desktops can restore a stale single-image wallpaper for that desktop, so one image is temporarily or permanently shown on both monitors until WDD refreshes the current desktop.I reproduced this with:
Calling
/refreshafter every desktop switch reduces the visible error but introduces a second problem: rapid switches can overlap scheduler work. In my test this causedEventScheduler.Runto throwNullReferenceExceptionand terminate WDD.Proposed opt-in behavior
Add an experimental option for users who combine per-display themes with Windows 11 virtual desktops:
IDesktopWallpaper.GetMonitorDevicePathAt(index)andGetMonitorRECTso the image index and physical monitor coordinates come from the same API WDD already uses.GetMonitorRECTreturns physical pixel bounds.Spanand assign the same composite path to every Windows virtual desktop before the user switches.This changes the state Windows must persist from “one path per virtual desktop per physical display” (which Windows 11 does not reliably retain) to one supported composite path per virtual desktop. It also avoids any post-switch WDD refresh.
Compatibility and scope
I found the v5.1 changelog note and commit
786be9b, which removed virtual-desktop synchronization because the API was too experimental and directed users to theSyncVirtualDesktopsscript. I suggest keeping the new behavior:The existing script only supports one image across all monitors. The proposed compositor handles different images and arbitrary monitor topology.
Would this opt-in design be acceptable for a draft PR, and is the current
VirtualDesktoppackage still the preferred integration point for updating every desktop?Related: #321 and the experimental
SyncVirtualDesktops.ps1int1m0thyj/WDD-scripts.