1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2026-04-03 20:32:07 -04:00

wallpaper: defer updatesEnabled binding

This commit is contained in:
bbedward
2026-02-28 01:10:04 -05:00
parent 64c9222000
commit 4bcd786be3

View File

@@ -85,12 +85,7 @@ Variants {
} }
Component.onCompleted: { Component.onCompleted: {
if (typeof blurWallpaperWindow.updatesEnabled !== "undefined") renderSettleTimer.restart();
blurWallpaperWindow.updatesEnabled = Qt.binding(() => root.effectActive || root._renderSettling || currentWallpaper.status === Image.Loading || nextWallpaper.status === Image.Loading);
if (!source) {
root._renderSettling = false;
}
isInitialized = true; isInitialized = true;
} }
@@ -99,6 +94,7 @@ Variants {
readonly property bool transitioning: transitionAnimation.running readonly property bool transitioning: transitionAnimation.running
property bool effectActive: false property bool effectActive: false
property bool _renderSettling: true property bool _renderSettling: true
property bool _updatesOptimized: false
property bool useNextForEffect: false property bool useNextForEffect: false
Connections { Connections {
@@ -114,7 +110,13 @@ Variants {
Timer { Timer {
id: renderSettleTimer id: renderSettleTimer
interval: 100 interval: 100
onTriggered: root._renderSettling = false onTriggered: {
root._renderSettling = false;
if (!root._updatesOptimized && typeof blurWallpaperWindow.updatesEnabled !== "undefined") {
root._updatesOptimized = true;
blurWallpaperWindow.updatesEnabled = Qt.binding(() => root.effectActive || root._renderSettling || currentWallpaper.status === Image.Loading || nextWallpaper.status === Image.Loading);
}
}
} }
onSourceChanged: { onSourceChanged: {