From 4e421e7cd1a730b33f218b1f61ccfa1fa67e89f4 Mon Sep 17 00:00:00 2001 From: Steve Barnegren Date: Thu, 6 May 2021 21:10:08 +0100 Subject: [PATCH] Terminate application when window closes --- CommentWrapper/AppDelegate.swift | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CommentWrapper/AppDelegate.swift b/CommentWrapper/AppDelegate.swift index de6628d..957bb71 100644 --- a/CommentWrapper/AppDelegate.swift +++ b/CommentWrapper/AppDelegate.swift @@ -19,6 +19,10 @@ class AppDelegate: NSObject, NSApplicationDelegate { // Insert code here to tear down your application } + func applicationShouldTerminateAfterLastWindowClosed(_ sender: NSApplication) -> Bool { + return true + } + // MARK: - Menu Bar Actions @IBAction private func helpMenuContactItemSelected(sender: AnyObject) {