Skip to content

fix: multi-monitor wallpaper cycling not working#2041

Closed
beckend wants to merge 1 commit intoAvengeMedia:masterfrom
beckend:fix-multi-monitor-wallpaper-cycling
Closed

fix: multi-monitor wallpaper cycling not working#2041
beckend wants to merge 1 commit intoAvengeMedia:masterfrom
beckend:fix-multi-monitor-wallpaper-cycling

Conversation

@beckend
Copy link
Contributor

@beckend beckend commented Mar 20, 2026

Summary

  • Fixed QML property binding timing issue in WallpaperCyclingService.qml where dynamically created timer and process objects were not being properly assigned when reading back from QML properties
  • Changed to store created objects in local variables first before assigning to QML property maps, ensuring reliable references

Root Cause

Multi-monitor wallpaper cycling used dynamically created objects stored in QML properties (monitorTimers, monitorProcesses). The code was:

  1. Creating object with createObject(root)
  2. Assigning to property map
  3. Reading back from property to get reference

This caused issues because QML property assignments don't always evaluate synchronously, so reading back immediately could return undefined or 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 creation
  • cycleToNextWallpaper() - line 261: Fixed process creation
  • cycleToPrevWallpaper() - line 294: Fixed process creation

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
@beckend beckend closed this Mar 20, 2026
@beckend beckend deleted the fix-multi-monitor-wallpaper-cycling branch March 20, 2026 22:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant