Skip to content

fix(wallpaper): keep a loading wallpaper when the surface regenerates - #3824

Merged
bbedward merged 1 commit into
duxlabs-dev:masterfrom
Conava:wallpaper-load-race
Oct 19, 2026
Merged

bbedward merged 1 commit into
duxlabs-dev:masterfrom
Conava:wallpaper-load-race

Conversation

@Conava

@Conava Conava commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

Description

This PR fixes a race resulting in a wallpaper change not being applied properly.
The wallpaper path, the picker and the generated colors all switch to the new image but the image doesnt change.

It happens when a fill mode or some monitor change gets executed while the new image is still loading.
regenerate() then reloads the old picture, and once that settles the freeze path calls finishTransition(), which clears nextWallpaper and drops the new image.
Now regenerate() skips reloading the old wallpaper while the next one is being prepared. The new wallpaper will then be loaded with the correct fill mode.

Ran into it while working on config profiles, where switching a profile changes wallpaper and fill mode together, but it can be reproduced on master:

dms ipc call wallpaper set <an image not shown yet> ; dms ipc call settings set wallpaperFillMode Fit

Type of change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that changes existing behavior)
  • Refactor / internal cleanup
  • Documentation
  • Other

Related issues

Screenshots / video

Checklist

When the wallpaper surface is idle it has released the current image.
A fill-mode or per-monitor change then calls regenerate(), which
reloads the old picture. If a new wallpaper is still decoding at that
moment, the old one comes back from the image cache first and the
freeze path calls finishTransition(), which clears nextWallpaper and
throws the new image away. The wallpaper path, the picker and the
generated colors all point at the new image, but the old one stays on
screen.

regenerate() now leaves currentWallpaper alone while nextWallpaper is
loading; the transition reloads it with the current fill mode when it
finishes.
@bbedward
bbedward merged commit fdb9410 into duxlabs-dev:master Oct 19, 2026
2 checks passed
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.

2 participants