Quit application after last window closed
This commit is contained in:
parent
5881a28110
commit
c2185d3c9f
@ -43,6 +43,10 @@ class AppDelegate: NSObject, NSApplicationDelegate {
|
|||||||
vc?.saveDocument()
|
vc?.saveDocument()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func applicationShouldTerminateAfterLastWindowClosed(_ sender: NSApplication) -> Bool {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
func applicationDidBecomeActive(_ notification: Notification) {
|
func applicationDidBecomeActive(_ notification: Notification) {
|
||||||
if vc == nil {
|
if vc == nil {
|
||||||
vc = NSApplication.shared().mainWindow?.contentViewController as? ViewController
|
vc = NSApplication.shared().mainWindow?.contentViewController as? ViewController
|
||||||
|
Loading…
Reference in New Issue
Block a user