Selecting whether to dock or quit an app

1

In OSX is it possible to set a preference for a program for whether it fully quits or stays running in the dock on closure of the last window? e.g. Netbeans for MAC defaults to completely quitting, so it's possible for a program to internally set this preference. Is it possible for the user to alter the preference in general?

wheresrhys

Posted 2012-02-21T12:24:40.930

Reputation: 442

Answers

2

There isn't a general preference that says to the applications if they should quit when their last window is closed, or if they should stay open; that behavior is hard coded in their code.

A general setting would not make sense, as the behavior depends from the type of application. Apple has guidelines about this.

In general, quit when users close the last open window in your app. In apps that are not document-based, users generally expect the app to quit when they close the main window. If an app continues to perform some function when the main window is closed, it might be appropriate to leave it running after the user closes the main window. For example, iTunes continues to play after the user closes the main window. If users close the last remaining document window in a document-based app and switch to another app, it’s appropriate to quit the app.

While saying to a document-based application to quit when the last window is closed would make sense, it would probably make less sense to say to an application like the preference panel to stay open when its window is closed.

kiamlaluno

Posted 2012-02-21T12:24:40.930

Reputation: 1 390

Apple need to follow their own advice. Some of the apps I'd like to set this preference on are apple's own because they stay running despite not being document based e.g. terminal. And many document based ones (e.g. preview, textedit) don't follow the second half of the guidelines. In fact these guidelines appear to be widely ignored by many apple and 3rd party apps. – wheresrhys – 2012-02-21T15:06:58.170

I've never seen any document-based app quit after the last window is closed, as that quote recommends. – Kevin Reid – 2012-02-21T16:33:18.707

@KevinReid The quotes says, "and switch to another app." I tried with TextEdit, opening a text file; Simply closing the document window doesn't close the application, but if I select "Hide TextEdit" (or pass to another application with Cmd-Tab) after I closed its last document window, TextEdit closes itself. – kiamlaluno – 2012-02-21T16:40:39.177

to name another, activity monitor completely fails to satisfy these guidelines. Apple, kings of seamless, consistent user experience... I think not! – wheresrhys – 2012-02-22T14:20:09.447

@kiamlaluno maybe it's OS version specific as that isn't happening on my machine – wheresrhys – 2012-02-22T14:21:30.363

iCal's yet another example where Apple don't follow their own guidelines – wheresrhys – 2012-02-22T14:32:56.123

The Activity Monitor could be a case of an application that perform some function when the main window is closed; iCal quits when its window is closed. What I report is for Mac OS X Lion, which is the OS I am actually using on my Macs. The reference to the guidelines was just to mean that applications are supposed to behave differently from each other, and there would not be a setting that is valid for every application. – kiamlaluno – 2012-02-22T14:47:11.627