Skip to content

fix: preserve fullscreen layouts through window restoration - #13

Merged
PangMo5 merged 1 commit into
mainfrom
pangmo5/fullscreen-session-restoration
Sep 11, 2026
Merged

PangMo5 merged 1 commit into
mainfrom
pangmo5/fullscreen-session-restoration

Conversation

@PangMo5

@PangMo5 PangMo5 commented Sep 11, 2026

Copy link
Copy Markdown
Owner

Closing and reopening three fullscreen TextEdit windows could overwrite their saved layout after the first window appeared, leaving the other two tiled. Activating a workspace after its app relaunched could also retain fullscreen identifiers from the old process.

This change retains complete layout templates while windows are absent and restores layout and fullscreen zoom through the same one-to-one slot bindings. Surviving windows keep their slots; explicit layout edits replace pending restoration. A no-op discovery preserves Auto-balance already applied to the partial live tree.

An empty display list now freezes the previous desktop before display ownership can be erased ahead of the sleep notification. Queued stale screen configurations are cancelled, and wake completion preserves the reconciled layout instead of resetting it when every window identifier changed. Automatic profile switching and independent per-profile workspace layouts retain their existing behavior.

Adds window/layout restoration guidance and profile-switch troubleshooting in all five supported languages. macOS and each app continue to decide which documents reopen; Tatami matches layout slots by app and window occurrence.

Validation

  • Full macOS Debug suite: 767 passed, 0 failed, 0 skipped.
  • Release build succeeded; generated-document check passed for all 35 documents; formatting and diff checks passed.
  • Tart: three native TextEdit document windows retain all fullscreen slots after quit/reopen; inactive-app relaunch, staggered arrival, survivor zoom ownership, and real virtual-display connect/disconnect checks passed.
  • Actual guest restart with window reopening enabled preserved three saved document slots; starting Tatami afterward restored three full frames. Reopening disabled did not reopen the documents.
  • Final Release executable was hash-verified in the guest and passed the three-window TextEdit restoration smoke test.

Physical clamshell/dock transitions and unattended Tatami Launch at Login remain unverified in the VM. The restart validation used a manual Tatami launch because LaunchServices execution has a separate Accessibility permission boundary in that guest.

- Retain complete layout templates and bind replacement windows to distinct
  slots across app relaunches, partial restoration, and window removal.
- Preserve display ownership before sleep when the screen list becomes empty,
  cancel stale topology notifications, and retain reconciled wake layouts.
- Let explicit layout edits replace pending restoration while preserving
  Auto-balance ratios during unchanged window discovery.
- Document macOS window reopening and independent profile layouts in all
  five supported languages; preserve automatic profile-switching policy.

Tests: 767 macOS tests passed; Release build succeeded; 35 generated docs
verified. Tart validation covered native TextEdit reopening, inactive and
staggered windows, virtual display reconnects, and restoration after a real
restart with manual Tatami launch. Physical clamshell and unattended login
launch remain outside the VM validation boundary.
@PangMo5
PangMo5 merged commit 7c7e3ca into main Sep 11, 2026
1 check 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.

1 participant