In the windowing user interface, why does quitting an application open the minimised window of a running application? This happens in Mavericks, and possibly earlier versions of the OS.
OSX is setup to have a window take focus, this usually requires a Window to show, this is being in the foreground. The application that this window belongs to is the process that receives and interprets keystrokes (strictly key events) (after the system global ones are dealt with)
Thus when you quit an application the OS has to choose an Application to put in the foreground.
I can't find the overall description in one document so this is based on development experience. If someone could find the correct overview this would help.
I guess you might be talking about other systems way of 'quitting' an application, that is by pressing 'x' button on the top left.
In Mac OS X by doing that you're not quitting the application, but just closing the window which you pressed 'x' button of; the application usually still runs in the background (if you haven't changed that you should see light indicator under the icon in the dock for any running application (running means it's loaded into memory and does not necessary needs to have any open windows).
You might think of it as for example running Chrome in the background on Windows (only icon in sys tray), without actually having any browser windows open.
To properly quit an application you can do 3 things:
- instead of hitting 'x' button, press Ctrl+q
- right click on the application icon in Dock -> Quit
- use top bar menu for application, f.ex.: Chrome -> Quit Google Chrome
Note: some applications may react differently for 'x' button. From the top of my head: calculator will quit completely; pressing 'x' on running Parallels VM window will suspend it.
(edit) there is one more way of closing an application, that is to press Cmd+Option(Alt)+Esc - that will bring 'Force quit application' window. But it is generally used if some application is misbehaving, so is not a "proper" way of quitting an app.
(edit2) ofc you can also kill the application process in the console, but that is also not default way of doing it :)