Hide window on Cmd+W for macOS (close-window-to-hide behavior)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 4.6
parent
d43e0c126b
commit
40781f668a
+1
-1
@@ -515,7 +515,7 @@ func (m *MainWindow) addShortcuts() {
|
|||||||
m.Controller.SelectAll()
|
m.Controller.SelectAll()
|
||||||
})
|
})
|
||||||
m.Canvas().AddShortcut(&shortcuts.ShortcutCloseWindow, func(_ fyne.Shortcut) {
|
m.Canvas().AddShortcut(&shortcuts.ShortcutCloseWindow, func(_ fyne.Shortcut) {
|
||||||
if m.App.Config.Application.CloseToSystemTray && m.HaveSystemTray() {
|
if runtime.GOOS == "darwin" || (m.App.Config.Application.CloseToSystemTray && m.HaveSystemTray()) {
|
||||||
m.Window.Hide()
|
m.Window.Hide()
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user