Why Do Mac Windows Reappear When You Relaunch an App?

When you quit an app on a Mac with windows still open, then those windows will usually reappear when you relaunch the app. You can control this by closing the windows first, changing a system setting, or use a modifier key when quitting the app. You also have another option when you log out or shut down your Mac.
▶ You can also watch this video at YouTube.
▶ Watch more videos about related subjects: System Settings (175 videos).

Video Transcript

Hi, this is Gary with MacMost.com. Ever wonder why sometimes windows on your Mac will come back when you relaunch an app, when you logout and then back in or when you restart, or maybe they don't but you would like them to work that way. 
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 on your Mac sometimes when you've got windows open in an app and you quit the app the next time you launch the app those windows come back. Let me show you why that happens and how to control it. 
Now let's say you're in an app like Pages and you've got two different windows open. Two different documents and they both have a specific position and size on the screen. Notice if I were to Quit Pages here and then relaunch Pages those two windows come back at exactly the same location and size. This is the default. This is how it is supposed to work. When you quit an app it doesn't necessarily close the windows. The app remembers that it was viewing these documents in these windows and will bring them back. You've actually got a control for that in System Settings. If you go to Desktop & Dock, scroll down to Windows & Apps. There is one called Close Windows When Quitting an Application. If you turn this On and now with Pages if I were to Quit Pages and then reopen Pages notice it just gives me an open dialogue or you may actually see the Template Chooser. It will still remember the size and position of those window if you reopen those documents but they won't automatically be reopened just by launching Pages. 
Now let's turn this Off. You can control this on a case-by-case basis instead of having to go to System Settings every time. Now if I were to close the windows first, by either using the red X here or just Command W to close the window, then I were to quit Pages. At the time I quit Pages no windows were open. So that is what I'm going to get when I relaunch Pages. I can still go to Open Recent and open these up again like before but it won't do it automatically. 
Now you can actually control this on a case by case basis. If you look in the Pages Menu and you see Quit Pages here and you hold the Option Key down you'll see that changes to Quit and Close All Windows. You can simply use Option Command Q. If I were to use that then it wouldn't obey the System Settings' setting. It would instead just obey what I chose there. Now when I relaunch Pages I don't get those windows back. Back in System Settings if I were to toggle this back On then in Pages for Quit Pages if I use the Option Key that is now the opposite. Quit & Keep Windows. So you can basically use System Settings to choose your default and then use the Option Key when you use Command Q to toggle it the other way. 
Now there is another level to this. Instead of quitting a single app what if you were to logout or restart or shutdown. Now keep in mind restarting or shutting down is essentially logging out of your account. It's just logging out of your account and either restarting or completely shutting down the machine. But logging out is part of that. So after the restart is complete or after you start your Mac up again you're going to log back in or if you just logged out then you're going to log back in. Either way there is a logout performed and a login performed. Now when you do that you get a choice. If I go to the Apple Menu and then logout you'll see there's a checkbox, Reopen windows when logging back in. This is basically a higher level of the same thing. Right now I've still got Pages running. So if I were to logout now what essentially is going to happen is Pages is going to have to Quit. You can't have an app still running for a user if the user isn't logged in and there are no apps running for that user. The user is just completely logged out. So this checkbox controls what happens when you've logged back in or you start your Mac up again. If it is checked that means the apps will relaunch. The ones that had to be quit for the logout to happen and the windows will come back as well. So you can turn that Off if you want and that way when you log back in it will start fresh, no apps will be restarted and you'll see no windows that you had there before at the time that you logged out. 
You'll see the same exact checkbox if you were to restart or shutdown your Mac because the logout has to be performed. Note this checkbox will override this System Setting. So even if you have Close All Windows When Quitting an Application, technically logging out is quitting the application because you're quitting the application during the logout and you've checked that box. That is the preference that will be followed, not this one. So in other words with this turned On if I were to Quit Pages and then launch it again those windows would not come back. However, if I were to instead logout with this checked then when I log back in the windows would come back. 
Now the best way to use this is probably to have Close Windows When Quitting an Application turned Off in System Settings. Then if you want to close a document or a window actually close it. Don't rely on quitting to close anything because those windows will just reopen when you relaunch the app. So let's say I do want to quit Pages but the next time I launch Pages I only want this document to reopen, not this one. Well, now I should take the time to close this document. Leave this one open so this window will reopens next time, and now Quit Pages. Then that is exactly what I'll get when I relaunch Pages the next time.
Hope you found this useful. Thanks for watching. 

Comments: 5 Comments

    Kathy
    2 years ago

    Hi Gary, I notice that when there's a new OS version or update on my iMac that after the installation is complete & I log back into my account that any windows that show a dot under them in the dock will open automatically even though I have selected to "Close Windows when quitting an Application" in system settings-desktop & dock. Is this expected behaviour after an update to Mac OS? Thanks very much.

    2 years ago

    Kathy: The restart dialog checkbox overrides the "quit" setting. See 4:26.

    Kathy
    2 years ago

    Hi Gary, Yes I saw that in your video thank you. But, I have that unchecked as a routine. Sorry I neglected to mention that. Maybe I'm missing something but I don't see the restart dialogue box when a system update happens, I just get taken to my login screen. Is that a setting I wonder or does an OS update override the checkbox for the dialogue box? Thanks

    2 years ago

    Kathy: Right, sorry, so the idea is a restart is not really the same as quitting all apps and restarting. And that's what is happening with an update. Keeping in mind the Dock shows apps, not windows, and the dots show which apps are currently running.

    Kathy
    2 years ago

    Thank you Gary!

Comments are closed for this post.