From f6732dc3da07c91094db82bde4789396d0eedcb4 Mon Sep 17 00:00:00 2001 From: mx Date: Tue, 13 Oct 2026 15:40:26 +0200 Subject: [PATCH] Mask the incoming wallpaper with its own layer effect A MultiEffect pointed at a hidden source drew nothing, so the reveal was invisible and the wallpaper still cut over at the end. Co-Authored-By: Claude Opus 5.5 --- quickshell/wallpaper/WallpaperBackground.qml | 34 ++++++++++---------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/quickshell/wallpaper/WallpaperBackground.qml b/quickshell/wallpaper/WallpaperBackground.qml index 4b13777..01538e2 100644 --- a/quickshell/wallpaper/WallpaperBackground.qml +++ b/quickshell/wallpaper/WallpaperBackground.qml @@ -1,3 +1,4 @@ +pragma ComponentBehavior: Bound import QtQuick import QtQuick.Effects import Quickshell @@ -40,15 +41,6 @@ PanelWindow { // Drop the overlay only once the base layer shows the new image. onStatusChanged:root.settle() } - Image { - id:incoming - anchors.fill:parent - visible:false - sourceSize:Qt.size(parent.width,parent.height) - asynchronous:true - fillMode:Image.PreserveAspectCrop - onStatusChanged:if(status===Image.Ready && source.toString())reveal.restart() - } Item { id:revealMask anchors.fill:parent @@ -61,17 +53,25 @@ PanelWindow { color:"black" } } - MultiEffect { + // The mask must be the image's own layer effect: a MultiEffect pointed at a + // hidden source renders nothing here. + Image { + id:incoming anchors.fill:parent - visible:root.transitioning - source:incoming + visible:root.transitioning && root.progress>0 + sourceSize:Qt.size(parent.width,parent.height) + asynchronous:true + fillMode:Image.PreserveAspectCrop // Settles from a slight zoom while the circle widens, like swww/awww "grow". scale:1.06-0.06*root.progress - opacity:Math.min(1,root.progress*4) - maskEnabled:true - maskSource:revealMask - maskThresholdMin:0.5 - maskSpreadAtMin:1 + onStatusChanged:if(status===Image.Ready && source.toString())reveal.restart() + layer.enabled:root.transitioning + layer.effect:MultiEffect { + maskEnabled:true + maskSource:revealMask + maskThresholdMin:0.5 + maskSpreadAtMin:1 + } } NumberAnimation { id:reveal