Make video wallpapers survive first contact

Shipping met reality tonight, and reality won three rounds before we
did. mpvpaper's -f forks it into the background, which a supervisor
reads as instant death — the respawn loop repainted the desktop black
once a second. The reaper's own kills fired onExited like crashes, so
the supervisor ate its young until deliberate deaths got marked. And
the video's path shared wallpaperPath with the still pipeline, whose
transactional persistence clobbered it — it now lives under its own
videoWallpaperPath key, read by the lock screen and the doctor too.

Restore is the service's own now, reactive and once per session: a
one-shot timer raced the async preference load and availability probe
at cold start and silently lost. A video-wallpaper IPC target drives
start/stop/pause from a terminal and from the contract sweep to come.

Verified live: one player per output, same PID across restarts, VAAPI
engaged, 0.2% CPU steady for 1440p30 h264, pause from the bar pill.

Claude-Session: https://claude.ai/code/session_01Ms2FbjQy31TVf3CEvQhGM8
This commit is contained in:
Gabriel Brown
2026-08-23 23:57:04 -04:00
parent cb7c09d208
commit 4d7a194300
7 changed files with 148 additions and 24 deletions
+25
View File
@@ -477,6 +477,31 @@ ShellRoot {
}
}
// Video wallpapers: what the bar pill and Settings do, reachable from a
// terminal and from test harnesses. start() routes through Wallpaper so a
// video rides wallpaperPath exactly like a click in the picker.
IpcHandler {
target: "video-wallpaper"
function start(path: string): void { Wallpaper.setSingle(path); }
function stop(): void { VideoWallpaper.stop(); }
function pause(): void { VideoWallpaper.manuallyPaused = true; }
function resume(): void { VideoWallpaper.manuallyPaused = false; }
function rescan(): void { VideoWallpaper.rescan(); }
function status(): string {
return JSON.stringify({
available: VideoWallpaper.available,
active: VideoWallpaper.active,
path: VideoWallpaper.path,
paused: VideoWallpaper.paused,
manuallyPaused: VideoWallpaper.manuallyPaused,
gamePaused: VideoWallpaper.gamePaused,
batteryPaused: VideoWallpaper.batteryPaused,
candidates: VideoWallpaper.candidates.length,
lastError: VideoWallpaper.lastError
});
}
}
IpcHandler {
target: "settings"
function open(): void { ShellState.openSettings(DesktopPreferences.get("lastPage") || "home"); }