From 52e8897f1edd2d06e98a1e9162f3ff98e82cf921 Mon Sep 17 00:00:00 2001 From: "Danilo M." Date: Thu, 29 Oct 2026 17:17:09 +0100 Subject: wallpaper: start wallp only once the burn's cover is on screen The new wallpaper flashed in for a moment, the old one came back over it, and only then did it burn. run() started wallp in the same turn as swapping, while the cover was still mapping and decoding its two pictures asynchronously, so swaybg swapped under an empty cover. run() now holds wallp until each cover reports it is drawing (its pictures decoded, then 50ms for a few frames), with a 1.5s fallback for a cover that never comes: a missing screen or a picture that fails to load. A run with nothing to cover starts at once, as before. Co-Authored-By: Claude Opus 5.5 --- desktop/modules/appearance/WallpaperSpread.qml | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'desktop/modules/appearance/WallpaperSpread.qml') diff --git a/desktop/modules/appearance/WallpaperSpread.qml b/desktop/modules/appearance/WallpaperSpread.qml index d1c383d..2f1dd03 100644 --- a/desktop/modules/appearance/WallpaperSpread.qml +++ b/desktop/modules/appearance/WallpaperSpread.qml @@ -73,7 +73,17 @@ Scope { // would pop in late over a half-drawn screen. readonly property bool ready: running && oldImg.status === Image.Ready && newImg.status === Image.Ready - onReadyChanged: if (ready) anim.restart() + onReadyChanged: if (ready) { + anim.restart(); + drawn.restart(); + } + // A few frames for the cover to reach the screen, then wallp may + // swap swaybg underneath it. + Timer { + id: drawn + interval: 50 + onTriggered: Wallpapers.covered() + } // -m fill is a centred crop, which is what PreserveAspectCrop does. Image { -- cgit v1.2.3