The basic way to close any window

To close a window, look for the X button in the top-right corner of the window (on Windows) or top-left corner (on Mac). Click it once. The window closes and disappears from your screen.

That single click is the most common way to close a window. The window itself goes away, but the program that created it usually stays running in the background unless you close that too.

If you cannot see the X button because the window is too small or positioned oddly, you can move the window by clicking and dragging its title bar — the colored strip at the very top that usually shows the window's name.

Key Takeaways

  • The X button in the top corner closes a single window, but the program behind it keeps running unless you close that separately.
  • On Windows, the X is in the top-right; on Mac, it is in the top-left.
  • Closing a window and closing a program are two different actions — one closes what you are looking at, the other stops the program entirely.
  • If a window will not close, you can force-quit the program through Task Manager on Windows or Activity Monitor on Mac.

The difference between closing a window and closing a program

A window is what you see on your screen — the box with the document, email, or web page inside it. A program is the software running underneath. When you close a window, the program often keeps running, waiting for you to open another window or do something else.

For example, if you close a Chrome window, Chrome itself may still be running. You might see it still listed in your taskbar at the bottom of the screen, or you might open a new Chrome window and it remembers where you left off. To actually stop Chrome completely, you need to close the program, not just the window.

Some programs close entirely when you close their last window. Others stay running in the background. This is by design — the program is waiting for you to use it again or to receive notifications.

When a window will not close

Sometimes clicking the X button does nothing. The window stays open. This usually means the program has stopped responding or is stuck on a task.

On Windows, open Task Manager by pressing Ctrl + Shift + Esc, or right-click the taskbar and select Task Manager. Find the program name in the list, click it, and click End Task. This forces the program to close.

On Mac, open Activity Monitor by pressing Command + Space, typing "Activity Monitor," and pressing Enter. Find the program in the list, click it, and click the X button in the top-left, then click Force Quit.

Keyboard shortcuts to close windows

You do not have to use the mouse. On Windows, press Alt + F4 to close the active window. On Mac, press Command + W to close the active window.

These shortcuts work in almost every program. Alt + F4 on Windows and Command + Q on Mac will close the entire program, not just one window, if the program has only one window open.

What happens to your work when you close a window

If you close a window without saving your work, you will lose unsaved changes. Most programs warn you before closing — they show a dialog box asking "Do you want to save changes?" Click Save to keep your work, or Don't Save if you want to discard it.

Some programs auto-save your work, so closing the window does not mean losing anything. Google Docs, for example, saves as you type. Check your program's settings or look for "Auto-save" in the menu if you are unsure.

Closing multiple windows at once

If you have many windows open and want to close them all, you can close the program instead of each window individually. On Windows, right-click the program's icon in the taskbar and select Close all windows. On Mac, you can close all windows by pressing Command + Q while the program is active.

Be careful — closing the program closes every window it has open. If you have unsaved work in any of them, the program will ask you to save before closing.

Frequently Asked Questions

What is the difference between minimize and close?

Minimize hides the window but keeps the program running. The window disappears from your screen, but you can click the program's icon in the taskbar to bring it back. Close stops the window from showing and may stop the program entirely, depending on whether other windows are open.

Can I undo closing a window?

Not directly. Once a window is closed, it is gone. However, many programs let you reopen a recently closed window — in Chrome, press Ctrl + Shift + T to reopen the last closed tab, or Command + Shift + T on Mac. Other programs have similar features in their menu.

Why does my program keep running after I close the window?

The program is designed to stay running in the background. This lets it receive notifications, sync data, or be ready when you open a new window. To stop it completely, close the program itself using Alt + F4 on Windows or Command + Q on Mac, or use Task Manager or Activity Monitor.

What if the close button is grayed out or missing?

This usually means the window is frozen or the program is not responding. Use Task Manager on Windows or Activity Monitor on Mac to force the program to close. You can also try restarting your computer if the problem persists.