8000 Fix per-screen wallpaper lookup for directory sources by jamilahmadzai · Pull Request #1 · jamilahmadzai/macos-wallpaper · GitHub
[go: up one dir, main page]

Skip to content

Fix per-screen wallpaper lookup for directory sources - #1

Open
jamilahmadzai wants to merge 1 commit into
mainfrom
codex/fix-screen-wallpaper-resolution
Open

jamilahmadzai wants to merge 1 commit into
mainfrom
codex/fix-screen-wallpaper-resolution

Conversation

@jamilahmadzai
Copy link
Copy Markdown
Owner

Summary

  • resolve directory-backed wallpapers through each screen display UUID instead of returning the newest global database row
  • retain global and legacy-schema fallbacks when display relationships are unavailable
  • handle relative filenames, absolute paths, and file URLs returned by the desktop picture database
  • add focused in-memory SQLite coverage for two displays, recency, fallbacks, and path handling

Root cause

getFromDirectory selected the highest row ID from data without relating it to the requested screen. With different rotating wallpaper directories on multiple monitors, every screen therefore resolved to the same image.

The new lookup follows the database relationships from displays through pictures and preferences to data, using the UUID produced from the actual NSScreen display ID.

Testing

  • swift test — 5 tests, 0 failures
  • swift build -c release
  • swift run wallpaper screens
  • swift run wallpaper get
  • git diff --check

Addresses sindresorhus#25.

GitHub currently rejects creation of a cross-fork PR against the upstream repository even though its public metadata advertises external PRs. This fork PR provides the reviewable IssueHunt submission and the branch can be compared directly against upstream main.

@jamilahmadzai
jamilahmadzai marked this pull request as ready for review July 23, 2026 19:27
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

0