The three ways to close a window on Mac
On a Mac, closing a window does not always close the program running inside it. A window is just what you see on screen — the program keeps running in the background. You have three ways to close any window, and which one you use depends on what you want to happen next.
The fastest method is to click the red circle in the top-left corner of the window. This closes that single window but leaves the program open. If you want to close the program entirely, use Command+Q (hold down the Command key and press Q). The third option is to right-click the program's name in the Dock at the bottom of your screen and select "Quit" — this closes the program and all its windows at once.
Understanding the difference between closing a window and closing a program matters because you might close a window by accident and then wonder why the program is still running. The red button closes only what you see. Command+Q closes everything.
Key Takeaways
- Click the red circle button in the top-left corner of any window to close just that window while the program stays open in the background.
- Press Command+Q to close the entire program and all its windows at once.
- Right-click any program in the Dock and select "Quit" to close it completely without using the keyboard.
- A window and a program are different things on Mac — closing the window does not stop the program from running.
- If a program is frozen and will not close, use Force Quit (Command+Option+Escape) to shut it down without saving.
Using the red close button
The red circle in the top-left corner of every Mac window is the close button. Click it once and that window disappears. The program itself keeps running — you will still see its name in the Dock at the bottom of your screen, and you can open a new window by clicking the Dock icon or using the File menu inside the program.
This is useful when you have multiple windows open in the same program and want to close just one. For example, if you have three Safari windows open, clicking the red button on one closes only that window. The other two stay open, and Safari keeps running.
If a program shows a dialog box asking "Do you want to save changes?" when you click the red button, you have three choices: click "Save" to keep your work, click "Don't Save" to throw it away, or click "Cancel" to stop closing the window. This safety feature prevents you from losing work by accident.
Closing the entire program with Command+Q
Command+Q is the keyboard shortcut to quit a program completely. Hold down the Command key (it has a ⌘ symbol and sits next to the space bar) and press Q. This closes the program and every window it has open. The program name disappears from the Dock.
Before the program closes, it may ask whether you want to save changes to any open documents. If you see this dialog, choose "Save" to keep your work or "Don't Save" to discard it. If you click "Cancel," the program stays open and nothing closes.
Command+Q works in almost every Mac program. It is faster than clicking the red button multiple times if you have many windows open and want to close them all at once. You can also use this shortcut when a program is frozen or not responding — though if it does not work, you will need Force Quit instead.
Quitting from the Dock
The Dock is the row of program icons at the bottom of your Mac screen. Right-click (or Control+click) any program icon in the Dock and a menu appears. Select "Quit" from this menu to close that program completely.
This method works the same way as Command+Q — the program closes and all its windows shut down. You may see a save dialog if the program has unsaved work. The advantage of using the Dock is that you do not need to remember a keyboard shortcut, and you can see at a glance which programs are running (they have a white dot under their icon).
If you want to close a program without opening any of its windows first, the Dock method is often the easiest. Just right-click the icon and quit. You do not have to click the icon to open it.
What to do when a program will not close
Sometimes a program freezes or stops responding to clicks and keyboard shortcuts. When Command+Q does not work and the red button does not respond, use Force Quit. Press Command+Option+Escape (hold Command and Option together, then press Escape). A window titled "Force Quit Applications" appears, showing every program running on your Mac.
Click the program that is frozen to select it, then click the "Force Quit" button. The program closes immediately without saving any work. This is a last resort — you will lose any changes you made since you last saved — but it is the only way to close a program that is completely stuck.
After you force quit a program, restart it normally. If it keeps freezing, the program may have a problem that needs to be fixed. Check the program's website or contact its support team to see if an update is available.
Closing multiple windows at once
If you have many windows open in one program and want to close them all, Command+Q is the fastest way. It closes the program and every window it contains in a single action. If you want to close all windows but keep the program running, you have to close each window individually by clicking the red button.
There is no built-in Mac shortcut to close all windows in a program while leaving the program open. You must click the red button on each window one at a time. If you have a lot of windows open, this can take a moment, but it is the only way to do it without quitting the program entirely.
One workaround is to use Mission Control to see all your open windows at once. Press F3 (or Control+Up Arrow on newer Macs) to see every window. You can then close windows by clicking the X that appears in the corner of each thumbnail, though this is not faster than clicking the red button on each window.
The difference between closing and minimizing
Minimizing a window is different from closing it. When you minimize, the window disappears from your screen but the program keeps running. When you close, the window goes away and the program may or may not keep running, depending on which method you used.
The yellow button next to the red close button minimizes a window. Click it and the window slides down into the Dock. Click the program's icon in the Dock to bring the window back. This is useful when you want to get a window out of the way temporarily but plan to use it again soon.
Do not confuse minimizing with closing. If you minimize a window and then close the program using Command+Q, the minimized window closes too. The program does not keep running just because a window is minimized.
Frequently Asked Questions
Does closing a window close the program?
No. Closing a window (by clicking the red button) closes only what you see on screen. The program keeps running in the background. To close the program itself, use Command+Q or right-click the Dock icon and select Quit.
What does the yellow button do?
The yellow button minimizes the window, which hides it from your screen and moves it to the Dock. Click the program's Dock icon to bring the window back. Minimizing is not the same as closing — the program still runs.
Can I close a frozen program without losing my work?
No. Force Quit closes a frozen program immediately without saving. You will lose any changes made since you last saved. After force quitting, reopen the program and check if it has a recovery feature that can restore your work.
Why does my program ask if I want to save when I close a window?
The program is warning you that you have unsaved changes. Click "Save" to keep your work, "Don't Save" to throw it away, or "Cancel" to stop closing the window. This prevents you from accidentally losing work.
Is there a way to close all windows in a program without quitting it?
No. You must close each window individually by clicking the red button. Command+Q closes the program entirely. There is no shortcut to close all windows while keeping the program open.