Skip to content

Workspace: restore saved display layout by default#539

Open
armm77 wants to merge 1 commit into
trunkmaster:masterfrom
armm77:preferences
Open

Workspace: restore saved display layout by default#539
armm77 wants to merge 1 commit into
trunkmaster:masterfrom
armm77:preferences

Conversation

@armm77

@armm77 armm77 commented Jun 21, 2026

Copy link
Copy Markdown
Collaborator

The resolution chosen in Preferences->Display was correctly written to ~/Library/Preferences/.NextSpace/Displays-.config, but it was never reapplied on login. Workspace_main gated the restore on [defs boolForKey:@"RestoreDisplayLayout"] != NO, and since boolForKey: returns NO for an absent key, the condition was always false — the key is not set in any default config, so the layout was never restored and the display reverted to the X/RandR default after every reboot.

Treat a missing RestoreDisplayLayout key as YES, so the saved layout is restored unless the user explicitly disables it. Also ship the key in the skel Workspace defaults for discoverability on new installs. Restoring is safe: applyDisplayLayout: validates the layout first, and a hardware change yields a different config hash that falls back to the default layout.

The resolution chosen in Preferences->Display was correctly written to
~/Library/Preferences/.NextSpace/Displays-<hash>.config, but it was never
reapplied on login. Workspace_main gated the restore on
[defs boolForKey:@"RestoreDisplayLayout"] != NO, and since boolForKey:
returns NO for an absent key, the condition was always false — the key is
not set in any default config, so the layout was never restored and the
display reverted to the X/RandR default after every reboot.

Treat a missing RestoreDisplayLayout key as YES, so the saved layout is
restored unless the user explicitly disables it. Also ship the key in the
skel Workspace defaults for discoverability on new installs. Restoring is
safe: applyDisplayLayout: validates the layout first, and a hardware
change yields a different config hash that falls back to the default layout.
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