foxygit / doom Log in
commit 1e693bd3ee4ad2754476e5a216dc8f136db23498
Author:     Simon Howard <fraggle@soulsphere.org>
AuthorDate: Mon Mar 25 09:11:55 2019 -1000
Commit:     Simon Howard <fraggle@soulsphere.org>
CommitDate: Mon Mar 25 09:11:55 2019 -1000

    osx: Quit application after last window closes.

    If the launcher window is closed the application can be left in a
    state where it's still running but it's no longer possible to re-open
    the window. It makes more sense to just quit when it's closed.
---
 pkg/osx/AppController.m | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/pkg/osx/AppController.m b/pkg/osx/AppController.m
index 4d682ee5..428eb9d0 100644
--- a/pkg/osx/AppController.m
+++ b/pkg/osx/AppController.m
@@ -70,6 +70,10 @@
 {
 }

+- (BOOL)applicationShouldTerminateAfterLastWindowClosed:(NSApplication *)_ {
+    return YES;
+}
+
 - (BOOL) application:(NSApplication *) application
          openFile:(NSString *) fileName
 {