The three ways to close a window on your Mac

You close a window on Mac by clicking the red circle in the top-left corner of the window, pressing Command+W on your keyboard, or choosing File > Close Window from the menu bar. All three do the same thing: they shut the window but leave the program running. If you want to shut down the program entirely, you use Command+Q instead.

The red close button is the fastest method if your hands are on the mouse. The keyboard shortcut Command+W is faster if you are typing. The menu option works the same way but takes more steps, so most people use it only when they forget the keyboard shortcut.

Understanding the difference between closing a window and closing an process matters because closing a window does not save your work automatically. If you have unsaved changes, macOS will ask you to save before the window closes. If you ignore that warning and close anyway, you lose those changes.

Key Takeaways

  • Click the red circle button in the top-left corner of any window to close it without closing the program.
  • Press Command+W as a faster keyboard shortcut for closing the active window.
  • Closing a window is different from closing an process — the program keeps running in the background after you close its window.
  • If you have unsaved work, macOS will prompt you to save before closing the window.
  • Use Command+Q to close the entire program, not just the window.

Using the red close button

The red circle sits in the top-left corner of every window on your Mac, next to a yellow circle and a green circle. Move your cursor to that red circle and click it once. The window closes when ready if there are no unsaved changes. If you have unsaved work, a dialog box appears asking whether you want to save, discard, or cancel.

The red button is the most visible way to close a window, which is why many people use it. It works the same way whether you are closing a web browser tab's parent window, a document in an process, or any other window on your screen. The button appearance does not change based on what program you are using.

Using the Command+W keyboard shortcut

Hold down the Command key (the one with the Apple logo) and press W. This closes the active window — the one you are currently looking at or typing in. If you have multiple windows open in the same program, Command+W closes only the one in focus, and the program stays open with your other windows still visible.

This shortcut is faster than moving your mouse to the top-left corner, especially if you are working quickly between documents or web pages. You can press Command+W repeatedly to close multiple windows one after another. If any window has unsaved changes, macOS stops and asks you to save before moving to the next one.

Closing a window versus closing an process

Closing a window and closing an process are two separate actions. When you close a window, the program itself keeps running — you just remove that particular window from your screen. You can tell the program is still open because its name still appears in the menu bar at the top, and the program icon in the Dock (if it is there) usually shows a dot underneath.

To close the entire program, press Command+Q instead of Command+W. This shuts down the process completely. The next time you want to use that program, you have to open it again. Most people close windows when they are done with one task but plan to use the program again soon, and close the process when they are finished for the day.

What to do if a window will not close

If you click the red button or press Command+W and nothing happens, the window is usually waiting for you to respond to a dialog box. Look for a small window in front of the main window asking you to save changes, confirm an action, or enter information. Click the appropriate button in that dialog — usually "Save", "Don't Save", or "Cancel" — and then try closing again.

If a dialog box is not visible, try clicking on the window itself to make sure it is the active window, then try Command+W again. If the window still will not close and you cannot see any dialog box, you can force-quit the program by pressing Command+Option+Esc, selecting the program name, and clicking "Force Quit". This closes the program and all its windows when ready, but you will lose any unsaved work.

Closing multiple windows at once

If you want to close all windows in a program at once, press Command+Option+W. This closes every window that program has open while keeping the program itself running. It is useful when you have accumulated many windows and want to start fresh without closing the process.

To close the program and all its windows together, use Command+Q. This is the fastest way to shut everything down at once. If any window has unsaved changes, macOS will ask you about each one before closing, so you do not lose work by accident.

Frequently Asked Questions

What is the difference between the red, yellow, and green buttons?

The red button closes the window. The yellow button minimizes the window, hiding it from view but keeping it open in the background — you can click the program icon in the Dock to bring it back. The green button maximizes the window to fill your screen, or returns it to normal size if it is already maximized.

Will closing a window close my work?

Closing a window does not delete your work if you have saved it. If you have unsaved changes, macOS asks you to save before closing. If you click "Don't Save", those unsaved changes are lost, but any work you saved earlier stays on your computer.

Can I close a window without saving?

Yes. When macOS asks whether you want to save changes, click "Don't Save" to close the window without saving. Any changes you made since the last save are discarded. This is useful if you made changes by accident and want to discard them.

Why does my window not close when I press Command+W?

Usually a dialog box is waiting for your response, even if you cannot see it clearly. Try clicking on the window and looking for any small boxes asking you to confirm, save, or enter information. If you still cannot find it, press Escape to cancel any hidden dialog, then try Command+W again.

Does closing a window stop the program from running?

No. Closing a window leaves the program running in the background. The program continues to use memory and may continue running tasks. To stop the program completely, press Command+Q to close the process.