Commit 0ed793f
authored
Fix recurring stuck/unfocusable main window in menu-bar-only mode (#223)
In menu-bar-only mode the app runs as .accessory, where a visible main
window can't become key/active — it shows but can't take focus, so the
whole UI appears frozen (can't navigate or change settings). SwiftUI's
WindowGroup still instantiates the window at launch, and configureWindow
forced it front via orderFrontRegardless(), racing MenuBarManager's
hideMainWindow(). When that race lost, the window stayed visible but dead.
configureWindow now keeps the window hidden when the app is .accessory;
it's shown with .regular policy when opened from the menu bar (the
intended menu-bar-only flow), so a visible window is always focusable.
Co-authored-by: thefourCraft <thefourCraft@users.noreply.github.com>1 parent 9068f96 commit 0ed793f
1 file changed
Lines changed: 13 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
46 | | - | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
47 | 59 | | |
48 | 60 | | |
49 | 61 | | |
| |||
0 commit comments