Multi-window support with their own connections#98
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: eb802c4c7e
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| key(window.id) { | ||
| val windowState = rememberPersistedWindowState() | ||
| Window( |
There was a problem hiding this comment.
Give each window its own persisted state
rememberPersistedWindowState() reads/writes a single preference node (WindowPreferences.kt uses a fixed WindowPrefNode), so every new window loads the exact same position/size. With multi-window support, this means “New Window” opens directly on top of the existing window (often appearing like nothing happened) and resizing/moving one window overwrites the persisted state for all others. This is user-visible whenever more than one window is open; consider using a per-window key or offsetting new windows to avoid overlap.
Useful? React with 👍 / 👎.
With multi-client connections, we can now easily support multiple windows.