Wallpaper: restore the user's desktop when going dormant
The wallpaper maker/runtime overrides the desktop with the cockpit wallpaper on profile activation but never put the user's own back. Now RioCoordinator captures the current wallpaper (SPI_GETDESKWALLPAPER, via new WallpaperApplier.GetCurrent) the first time it overrides it, and restores it (WallpaperApplier.Restore) on every GoDormant and on Dispose — so going idle, a native game taking the port, or app exit returns the desktop to what the user had. Capture is once-per-override so switching between cockpit profiles keeps the real previous wallpaper; only engages when OverlayTemplatePath is set. Builds clean on net48 + net40. Known gap (documented in PLAN.md): a hard crash between apply and restore leaves the cockpit wallpaper, since SPIF_UPDATEINIFILE persists it. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
+9
-2
@@ -254,8 +254,15 @@ Replaces the legacy Google-Sheet → `.data` → GIMP → Script-Fu pipeline
|
||||
generates + applies the wallpaper on profile activation when
|
||||
`AppConfig.OverlayTemplatePath` is set (best-effort, off by default, never breaks
|
||||
activation). The live `SystemParametersInfo` apply changes a user setting, so it
|
||||
is gated behind config and not exercised by tests. ⏳ Optional: restore the prior
|
||||
wallpaper when going dormant.
|
||||
is gated behind config and not exercised by tests. **Restore-on-dormant — done ✅:**
|
||||
`RioCoordinator` captures the user's own wallpaper (`WallpaperApplier.GetCurrent`)
|
||||
the first time it overrides it, and puts it back (`WallpaperApplier.Restore`) on
|
||||
every `GoDormant` and on `Dispose` — so idle/native-game/exit return the desktop
|
||||
to what the user had. Capture is once-per-override (switching between cockpit
|
||||
profiles never records a cockpit wallpaper as the "previous"); only engages when
|
||||
`OverlayTemplatePath` is set. Known gap: a hard crash between apply and restore
|
||||
leaves the cockpit wallpaper (SPIF_UPDATEINIFILE persists it) — a future
|
||||
crash-recovery could persist the saved path to config.
|
||||
- **Wallpaper maker — done ✅.** `RioJoy.Tray/Editor/WallpaperMakerForm` (tray →
|
||||
"Wallpaper maker") is the interactive replacement for the Sheet → GIMP pipeline:
|
||||
it renders the profile's wallpaper live on the template base image, outlines all
|
||||
|
||||
Reference in New Issue
Block a user