Why Does Closing Windows on a Mac not Quit the Application?

When switching from Mac to Windows many people wonder why Mac apps don't quit when you click the red close button at the top of the window. Here's how macOS and Windows differ when it comes to closing windows, plus lots of tips and tricks how to handle windows and apps.

Video Summary

In This Tutorial

Why closing a window on a Mac does not quit the application, how this differs from Windows, and tips on closing documents, quitting apps, resuming work, and the benefits of leaving apps running.

Intro

  • New Mac users often wonder why closing a window does not quit the app as it does in Windows, but this Mac behavior actually predates Windows, so it is Windows that does the alternative.

What Happens When You Close a Window

  • In apps where a window holds a document, such as Pages, Numbers, Keynote, browsers, and Terminal, the red close button, File Close, or Command W closes that window while the app keeps running, shown by the dot under its Dock icon and its presence in the App Switcher, and even Microsoft Word follows this rule.

Close a Document Then Open a New One

  • Because the app stays running when you close a document, you can immediately open a new document without relaunching the app, avoiding the extra step that quitting would require.

How To Quit an App

  • To actually quit an app rather than just close a window, use Command Q or Quit from the app menu.

Resume Document Setting

  • Quitting and relaunching an app reopens the documents that were open, so you can quit to set work aside and resume later, with this controlled by Close Windows When Quitting an Application under System Settings, Desktop and Dock, Windows and Apps.

Unnamed Marker

  • Most Mac apps auto-save or prompt before quitting, so unsaved changes are preserved, and the Ask to Keep Changes When Closing Document setting nearby controls prompting, while holding Option in the app menu toggles Quit to Quit and Close All Windows or Quit and Keep All Windows with the shortcut Option Command Q.

It Is OK To Leave Apps Running

  • Some single-window apps like Reminders quit when their last window closes, though Notes does not and Reminders can have multiple windows, but in general leaving a document-based app running with no windows uses essentially no resources and offers advantages such as more Dock menu options, keeping a non-Dock app temporarily in the Dock, faster App Switcher access, and avoiding relaunching slow apps like Xcode.

Just Two Different Ways Of Doing Things

  • The Mac and Windows approaches are simply two valid ways of working, each with trade-offs, and the key is getting used to choosing whether you want to close the document or quit the app.

Summary

On a Mac, closing a window closes only that document while the app keeps running, a behavior older than Windows. This lets you open new documents without relaunching and resume reopened windows after quitting, with settings controlling window closing and save prompts. Some apps quit on their last window, but leaving document apps running is harmless and even convenient, making the difference between Mac and Windows mainly a matter of habit.

Video Transcript

Hi, this is Gary with MacMost.com. Let's look at why closing windows on a Mac doesn't quit the application.
MacMost is brought to you thanks to a great group of more than 1000 supporters. Go to MacMost.com/patreon. There you can read more about the Patreon Campaign. Join us and get exclusive content and course discounts. 
So a common question of new Mac users is why, when you close a window, does the application not quit. The application is still running. Certainly in Microsoft Windows this works differently. If you close the last window of a running application the application quits. Now macOS and this behavior actually predates Windows. So it is Windows that is actually doing the alternative. Not the Mac. But regardless of that, if you're used to closing a window on Windows to quit an app and then that is not happening on the Mac it can be a little confusing. 
Now as an example here let's look at using Pages. So I've got the word processor Pages open with two different documents in two windows. So this is a typical application where a window contains a document. This is true for Pages, Numbers, Keynote and other apps as well. It's also true to say in browsers where a browser window or tab contains a location or in an app like Terminal where it contains an instance of using Terminal. Now you certainly wouldn't expect Pages to quit if I were to close one of these two windows. The other window is still there so using the red X button at the top left or File, Close or the keyboard shortcut Command W, all of those would simply close that window containing that document and you would be left with Pages still running with the other window, the other document, still there. So there is a consistency of having this red button do the same thing. It closes this window with this document but doesn't quit the app. You could see Pages is still running there and you could see it also here in the Dock with a dot under it. If I were to use the App Switcher, Command Tab, you could see Pages is one of the apps that is still running. 
So this works in other apps as well. For instance here I am in Safari. If I close this window here there is another one open. So you wouldn't expect Safari to quit. If I close this window Safari doesn't quit either. It's ready for me to open a New Window, New Private Window, or go to a Bookmark location. It even works that way in Microsoft apps. If I have two word documents open here I can close one. Then if I close the other you could see that it doesn't quit Microsoft Word. So even Microsoft Word, which doesn't always behave like a typical Mac App, will follow this basic rule. 
Now here is the classic example of why this is useful. Let's say you're working on this document here and you want to start a new one. What you may want to do then is close this document and now start a new one. But if Pages quits now you've got two steps. You actually have to launch Pages again before you start a new document. However, since Pages stays running because all you've done is close the document, not indicate that you want to quit Pages, you can now go and Open a new document without having to relaunch Pages. So do you need two steps to quit an app? Do you need to close the document and then go to Pages, Quit Pages or Command Q. Well if you just want to quit the app you can just quit it. Use Command Q or Quit Pages, and quit the app. 
Now an interesting thing happens when you do that. You relaunch Pages. Notice that the document that you had open before in a window, that reopens automatically. As a matter of fact if you had several documents open in several windows they would all reopen automatically. So you can actually be working on something, use Command Q to quit to get it out of the way and maybe switch to another task for awhile, and then when you go back to that application it resumes where you left off. Now whether it does this or not depends on your Settings. If you go to System Settings and then to Desktop & Dock there's a section here for Windows & Apps. The settings, Close Windows When Quitting An Application, is the one you want to look for. If that is Off quitting an app and then restarting it will bring all the document windows back. However, if you turn it On then quitting an app will actually do two things. Close all the current document windows and quit the app. 
But what happens if I'm in the middle of working on a document that I haven't saved? Well, just about all Mac apps will auto-save. If they don't they will prompt you to Save before you quit the app. But you can see here in Pages, if I were to make a change like this and without saving quit Pages, it auto-saves. I launch Pages again and you could see my changes are there. There is a setting for this as well. It was right in the same place. If you look right above that first setting you have Ask To Keep Changes When Closing Document. If you were to turn that On and then go to Close you could see how it is going to prompt you. However, if you were to simply Quit the app it does it without complaining. It will Save, in that case, regardless. Whichever way you have things setup to Close documents when you quit an app or not you can do the reverse. If you go to the App Menu here, where it says Quit if you hold the Option Key down it will change to Quit and Close All Windows or if you have that set as the default in System Settings then this would change to Quit and Keep All Windows. Notice the keyboard shortcut is then simply Option Command Q. 
Now not all apps behave like this. Some apps have a single window. When you close that single window it Quits the app. So a great example is the Reminders App. Reminders App, more or less, is just one window. You look at different lists in this one window. So when you Close this window, notice Reminders will Quit. However, there is some inconsistency. For instance, Notes works in a very similar way to Reminders. Yet if you Close the Notes window, Notes doesn't Quit. Furthermore, Reminders isn't always just a single window app. If I bring up the Context Menu on a list here I can choose Open List in New Window and have another window open. I can go over here to the Main window and close that and Reminders doesn't quit. But if I close the last window for Reminders it Quits. Just like a Windows app. 
So in general when you're dealing with apps that deal with documents or webpages they all work with being able to close a window without quitting the app. Sometimes even Apple doesn't follow its own rule, like with the Reminders App.
Now while this is all very interesting it really doesn't matter. If you close the last Pages' window, like that, and Pages is still running it's not a big deal. An app like Pages that has no windows and no documents open really isn't using any resources. Keeping it running doesn't really harm anything. In fact there are advantages to keeping it running. For instance, you have more options when you Control click on the Dock item. Most apps, for instance, have a new document menu item. It's only there if the app is still running. If I were to Quit Pages then I don't get that new Document button. Other apps, like Safari, you could see here don't have much going on if they are not running. But if I launch Safari and close this window now I could see Safari has New Window and New Private Window at Dock items. 
Another advantage is if the app is not normally in your Dock but you want to keep it there, if you Close a window, I'm using Pixelmator Pro here and I'll close this document window, Pixelmator Pro is still running but with no open windows. I can find it here on the right side of the Dock because it is still running. However, if I were to Quit Pixelmator Pro now it is no longer in the Dock. So it's a good way to temporarily get some items into the Dock just by leaving it running with no document open.
Another advantage is using the App Switcher. If I use Command Tab I could see apps, like for instance there's Pages, and I have no documents open in Pages. But I can easily App Switch to it and then maybe Command N for a new document without having to launch the app again. Of course there is the matter that some apps taking a decent amount of time to launch. Not typically apps like Pages or Safari. But an app, say, like Xcode actually takes a bit of time to get going. So if you're a developer and you close a project you're working on you may not actually want to Quit Xcode if you know that after doing a few other tasks you're going to simply open up another Xcode project. 
So really what this comes down to is basically two different ways of doing things. Both have their advantages and disadvantages. On Windows it is sometimes nice to be able to click one button and the app is gone. On the Mac it is nice to be able to Close a window and still have the app open ready for you to open up another document with that app. Longtime Mac users will scratch their heads over why Window users even complain about this and Windows users switching to Mac will wonder why Mac's work this way. But it is really just a matter of getting used to closing the document or quitting the app depending upon which one you really want to do. 
I hope you found this useful. Thanks for watching.