shithub: choc

Download patch

ref: 1e693bd3ee4ad2754476e5a216dc8f136db23498
parent: fd171dda546f38a9b7a6158ed2c3c8044e4ce72d
author: Simon Howard <fraggle@soulsphere.org>
date: Mon Mar 25 05:11:55 EDT 2019

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.

--- 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
 {