mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-04-03 20:32:07 -04:00
fix: multi-monitor wallpaper cycling not working (#2042)
Fixed a QML property binding timing issue where dynamically created timers and processes for per-monitor wallpaper cycling were being assigned to properties and then immediately read back, which could return undefined or stale values. The fix stores the created object in a local variable before assigning to the property map, ensuring a valid reference is always used. Affected functions: - startMonitorCycling() - timer creation - cycleToNextWallpaper() - process creation - cycleToPrevWallpaper() - process creation
This commit is contained in:
committed by
bbedward
parent
222187d8a6
commit
85173126f4
@@ -194,10 +194,11 @@ Singleton {
|
|||||||
var timer = monitorTimers[screenName];
|
var timer = monitorTimers[screenName];
|
||||||
if (!timer && monitorTimerComponent && monitorTimerComponent.status === Component.Ready) {
|
if (!timer && monitorTimerComponent && monitorTimerComponent.status === Component.Ready) {
|
||||||
var newTimers = Object.assign({}, monitorTimers);
|
var newTimers = Object.assign({}, monitorTimers);
|
||||||
newTimers[screenName] = monitorTimerComponent.createObject(root);
|
var newTimer = monitorTimerComponent.createObject(root);
|
||||||
newTimers[screenName].targetScreen = screenName;
|
newTimer.targetScreen = screenName;
|
||||||
|
newTimers[screenName] = newTimer;
|
||||||
monitorTimers = newTimers;
|
monitorTimers = newTimers;
|
||||||
timer = monitorTimers[screenName];
|
timer = newTimer;
|
||||||
}
|
}
|
||||||
if (timer) {
|
if (timer) {
|
||||||
timer.interval = settings.interval * 1000;
|
timer.interval = settings.interval * 1000;
|
||||||
@@ -258,9 +259,10 @@ Singleton {
|
|||||||
var process = monitorProcesses[screenName];
|
var process = monitorProcesses[screenName];
|
||||||
if (!process) {
|
if (!process) {
|
||||||
var newProcesses = Object.assign({}, monitorProcesses);
|
var newProcesses = Object.assign({}, monitorProcesses);
|
||||||
newProcesses[screenName] = monitorProcessComponent.createObject(root);
|
var newProcess = monitorProcessComponent.createObject(root);
|
||||||
|
newProcesses[screenName] = newProcess;
|
||||||
monitorProcesses = newProcesses;
|
monitorProcesses = newProcesses;
|
||||||
process = monitorProcesses[screenName];
|
process = newProcess;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (process) {
|
if (process) {
|
||||||
@@ -290,9 +292,10 @@ Singleton {
|
|||||||
var process = monitorProcesses[screenName];
|
var process = monitorProcesses[screenName];
|
||||||
if (!process) {
|
if (!process) {
|
||||||
var newProcesses = Object.assign({}, monitorProcesses);
|
var newProcesses = Object.assign({}, monitorProcesses);
|
||||||
newProcesses[screenName] = monitorProcessComponent.createObject(root);
|
var newProcess = monitorProcessComponent.createObject(root);
|
||||||
|
newProcesses[screenName] = newProcess;
|
||||||
monitorProcesses = newProcesses;
|
monitorProcesses = newProcesses;
|
||||||
process = monitorProcesses[screenName];
|
process = newProcess;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (process) {
|
if (process) {
|
||||||
|
|||||||
Reference in New Issue
Block a user