fix: multi-monitor wallpaper cycling not working#2041
Closed
beckend wants to merge 1 commit intoAvengeMedia:masterfrom
Closed
fix: multi-monitor wallpaper cycling not working#2041beckend wants to merge 1 commit intoAvengeMedia:masterfrom
beckend wants to merge 1 commit intoAvengeMedia:masterfrom
Conversation
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 file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
WallpaperCyclingService.qmlwhere dynamically created timer and process objects were not being properly assigned when reading back from QML propertiesRoot Cause
Multi-monitor wallpaper cycling used dynamically created objects stored in QML properties (
monitorTimers,monitorProcesses). The code was:createObject(root)This caused issues because QML property assignments don't always evaluate synchronously, so reading back immediately could return
undefinedor stale values.Single monitor worked fine because it uses statically declared QML objects accessed by ID (no property assignment path).
Changes
startMonitorCycling()- line 197: Fixed timer creationcycleToNextWallpaper()- line 261: Fixed process creationcycleToPrevWallpaper()- line 294: Fixed process creation