Some UI apps would like to exit when last window closes (on Mac) #1746

mrjbq7 opened this Issue Nov 10, 2016 · 2 comments


None yet

2 participants

mrjbq7 commented Nov 10, 2016

I think we should support this. Some apps (like spheres or bunny or boids) are essentially single-window apps and would probably like to exit when the last window is closed.

We can do this by overriding this to return YES instead of NO (the default):

-(BOOL)applicationShouldTerminateAfterLastWindowClosed:(NSapplication*)sender { return YES; }

But, we don't want to do this for all UI apps, so need a way to indicate such...

bjourne commented Nov 10, 2016

Is that a mac-specific problem? They terminate fine when you run them like this ./factor -run=spheres

mrjbq7 commented Nov 10, 2016

Seems like it's just a Mac thing. GTK and Windows both close after the last window is closed by default.

I could imagine wanting the default Factor app ( to still keep running when you close the last window (since you can make a new listener from the menu bar and that's more "Mac-like"), but most other apps may not want that.

@mrjbq7 mrjbq7 added the macosx label Nov 10, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment