Commit cf3d53d
fix: use setActivationPolicy instead of dock.hide/show
Replace app.dock.hide()/show() with app.setActivationPolicy():
- Normal mode: 'regular' (dock icon + running dot + App Switcher)
- Menu bar mode: 'accessory' (no dock icon, same as LSUIElement)
setActivationPolicy is the official macOS API for this, cleaner
than dock.hide() which has known Electron bugs. LSUIElement=true
kept in Info.plist to prevent dock icon flash on app launch.
Caveat: switching to 'accessory' hides all windows — re-show
with 100ms delay after policy change.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>1 parent 20908f9 commit cf3d53d
1 file changed
Lines changed: 12 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1032 | 1032 | | |
1033 | 1033 | | |
1034 | 1034 | | |
1035 | | - | |
1036 | | - | |
| 1035 | + | |
| 1036 | + | |
1037 | 1037 | | |
| 1038 | + | |
| 1039 | + | |
1038 | 1040 | | |
1039 | 1041 | | |
1040 | 1042 | | |
| |||
1972 | 1974 | | |
1973 | 1975 | | |
1974 | 1976 | | |
1975 | | - | |
| 1977 | + | |
| 1978 | + | |
| 1979 | + | |
| 1980 | + | |
| 1981 | + | |
| 1982 | + | |
1976 | 1983 | | |
1977 | | - | |
| 1984 | + | |
1978 | 1985 | | |
1979 | 1986 | | |
1980 | 1987 | | |
| |||
2131 | 2138 | | |
2132 | 2139 | | |
2133 | 2140 | | |
2134 | | - | |
| 2141 | + | |
0 commit comments