Commit b4ce482
committed
fix: prevent duplicate window on reopen from dock
Use Window scene instead of WindowGroup to prevent SwiftUI from
creating a second window when the app is reopened via dock icon
while the original window is hidden (not closed).
WindowGroup is designed for multi-window apps and creates a new
window instance when no visible window exists. Window is a single-
instance scene type that correctly handles the hidden window case.1 parent ce7a89f commit b4ce482
2 files changed
+2
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
112 | 112 | | |
113 | 113 | | |
114 | 114 | | |
115 | | - | |
| 115 | + | |
116 | 116 | | |
117 | 117 | | |
118 | 118 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
260 | 260 | | |
261 | 261 | | |
262 | 262 | | |
263 | | - | |
264 | | - | |
| 263 | + | |
265 | 264 | | |
266 | 265 | | |
267 | 266 | | |
| |||
0 commit comments