Always close window on .isVisible = false

E.g. "About" would open main window when launched from login item.
This commit is contained in:
Davide 2024-10-30 14:47:29 +01:00
parent a39583da1f
commit d12590387a
1 changed files with 2 additions and 4 deletions

View File

@ -40,16 +40,14 @@ public final class AppWindow {
if newValue { if newValue {
NSApp.activate(ignoringOtherApps: true) NSApp.activate(ignoringOtherApps: true)
window.makeKeyAndOrderFront(self) window.makeKeyAndOrderFront(self)
} else {
window.close()
} }
} }
} }
private init() { private init() {
} }
public func close() {
window.close()
}
} }
private extension AppWindow { private extension AppWindow {