Always close window on .isVisible = false
E.g. "About" would open main window when launched from login item.
This commit is contained in:
parent
a39583da1f
commit
d12590387a
|
@ -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 {
|
||||||
|
|
Loading…
Reference in New Issue