Skip to content

Commit dae74a4

Browse files
committed
wallpaper: tweak binding again for updatesEnabled
1 parent 959190d commit dae74a4

2 files changed

Lines changed: 17 additions & 9 deletions

File tree

quickshell/Modules/BlurredWallpaperBackground.qml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -100,10 +100,10 @@ Variants {
100100
Connections {
101101
target: currentWallpaper
102102
function onStatusChanged() {
103-
if (currentWallpaper.status === Image.Ready) {
104-
root._renderSettling = true;
105-
renderSettleTimer.restart();
106-
}
103+
if (currentWallpaper.status !== Image.Ready && currentWallpaper.status !== Image.Error)
104+
return;
105+
root._renderSettling = true;
106+
renderSettleTimer.restart();
107107
}
108108
}
109109

@@ -206,6 +206,7 @@ Variants {
206206
visible: false
207207
opacity: 1
208208
asynchronous: true
209+
retainWhileLoading: true
209210
smooth: true
210211
cache: true
211212
sourceSize: Qt.size(root.textureWidth, root.textureHeight)
@@ -218,6 +219,7 @@ Variants {
218219
visible: false
219220
opacity: 0
220221
asynchronous: true
222+
retainWhileLoading: true
221223
smooth: true
222224
cache: true
223225
sourceSize: Qt.size(root.textureWidth, root.textureHeight)
@@ -300,6 +302,8 @@ Variants {
300302
root.useNextForEffect = false;
301303
nextWallpaper.source = "";
302304
root.transitionProgress = 0.0;
305+
root._renderSettling = true;
306+
renderSettleTimer.restart();
303307
root.effectActive = false;
304308
}
305309
}

quickshell/Modules/WallpaperBackground.qml

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -93,10 +93,10 @@ Variants {
9393
Connections {
9494
target: currentWallpaper
9595
function onStatusChanged() {
96-
if (currentWallpaper.status === Image.Ready) {
97-
root._renderSettling = true;
98-
renderSettleTimer.restart();
99-
}
96+
if (currentWallpaper.status !== Image.Ready && currentWallpaper.status !== Image.Error)
97+
return;
98+
root._renderSettling = true;
99+
renderSettleTimer.restart();
100100
}
101101
}
102102

@@ -188,7 +188,7 @@ Variants {
188188

189189
Component.onCompleted: {
190190
if (typeof wallpaperWindow.updatesEnabled !== "undefined")
191-
wallpaperWindow.updatesEnabled = Qt.binding(() => !root.source || root.effectActive || root._renderSettling || root.overviewBlurActive || root._overviewBlurSettling || currentWallpaper.status === Image.Loading || nextWallpaper.status === Image.Loading);
191+
wallpaperWindow.updatesEnabled = Qt.binding(() => !root.source || root.effectActive || root._renderSettling || root.overviewBlurActive || root._overviewBlurSettling || root.pendingWallpaper !== "" || root._deferredSource !== "" || currentWallpaper.status === Image.Loading || nextWallpaper.status === Image.Loading);
192192

193193
if (!source) {
194194
root._renderSettling = false;
@@ -320,6 +320,7 @@ Variants {
320320
opacity: 1
321321
layer.enabled: false
322322
asynchronous: true
323+
retainWhileLoading: true
323324
smooth: true
324325
cache: true
325326
sourceSize: Qt.size(root.textureWidth, root.textureHeight)
@@ -333,6 +334,7 @@ Variants {
333334
opacity: 0
334335
layer.enabled: false
335336
asynchronous: true
337+
retainWhileLoading: true
336338
smooth: true
337339
cache: true
338340
sourceSize: Qt.size(root.textureWidth, root.textureHeight)
@@ -591,6 +593,8 @@ Variants {
591593
root.transitionProgress = 0.0;
592594
currentWallpaper.layer.enabled = false;
593595
nextWallpaper.layer.enabled = false;
596+
root._renderSettling = true;
597+
renderSettleTimer.restart();
594598
root.effectActive = false;
595599

596600
if (!root.pendingWallpaper)

0 commit comments

Comments
 (0)