Back to blog
Guides6 min read

Mac Window Off Screen? How to Get It Back After Unplugging a Monitor

A Mac window stuck off screen can be pulled back with the Window menu, a display toggle or a one-line script. Here is each fix, and how to stop it recurring.

Appish·

If a Mac window is stuck off screen, click its app in the Dock or press ⌘Tab to bring the app forward, then use Window → Move & Resize → Center (macOS 15 and later) or Window → Zoom to pull the window back onto the display you are looking at. If the menu does nothing, switch display mirroring on and off in System Settings → Displays, or move the window with a one-line script. Every method is below, from least to most effort.

Why does a window end up off screen in the first place?

macOS remembers where each window sat in a coordinate space that includes every connected display. Unplug a monitor, close the lid of a docked laptop or wake from sleep before the display reconnects, and a window can keep coordinates that no longer exist on any screen. Most of the time macOS rescues it. Sometimes it doesn't, especially with apps that restore their own window positions (many Electron and cross-platform apps), or when a window's title bar sits above the top of the screen where you can't grab it.

The symptom is always the same. The app shows in the Dock and the menu bar, ⌘Tab finds it, but there is no window anywhere.

What is the fastest fix with the Window menu?

  1. Click the app in the Dock or press ⌘Tab until it is frontmost, so its name shows in the menu bar.
  2. Open the Window menu in the menu bar.
  3. On macOS 15 Sequoia or later, choose Move & Resize → Center, or Fill to make it cover the screen. On older versions, choose Zoom.
  4. If the window comes back, drag it where you want it.

Note that Center places the window on the display it thinks it belongs to. If macOS still believes that display exists, the window can stay stranded, and the next fix is the one to try.

What if the Window menu doesn't help?

Try these in order:

  • Toggle mirroring. Go to System Settings → Displays, click your external display, and set Use As to Mirror For your built-in display. Windows usually collapse onto a single screen. Then switch it back to Extended Display. If you no longer have the external display, plug it in briefly to do this.
  • Check the arrangement. In System Settings → Displays → Arrange, make sure the screens sit where they physically are. A stale arrangement can leave a window in a gap.
  • Drag from anywhere. In many native apps, holding ⌃⌘ and dragging from any part of the window moves it, even when the title bar is out of reach. It doesn't work in every app.
  • Change the resolution. Switching the built-in display to a different scaled resolution and back makes macOS re-lay-out its windows. It is a blunt fix, but it often works.
  • Quit and reopen the app. A window the app itself repositioned at launch may open in a sane place. Some apps restore the bad position, in which case move on to the script.

Can I move an off-screen window with a script?

Yes, if you've given Terminal permission. macOS needs Device Control and Data Access (called Accessibility before macOS 27) under System Settings → Privacy & Security for whichever app runs the command. This sets the first window of Notes to 100 pixels from the top-left corner of the main display:

bash osascript -e 'tell application "System Events" to tell process "Notes" to set position of window 1 to {100, 100}'

Replace Notes with the process name of the stuck app. It works on most apps, but not on every one, and you have to run it each time. It is a rescue tool, not a way to live.

How do I stop it happening every time I unplug?

The fixes above treat a symptom. The cause is that macOS has no memory of "my windows when the monitor is connected" and "my windows when it isn't". Two ways to cover that gap:

  • A free window manager. Rectangle's center and snap actions give you a keyboard shortcut to yank any window back onto the current screen. It's solid and free, but it moves one window at a time and doesn't remember layouts per display setup.
  • Saved layouts. Layoutish saves where every window sits on every display, and display profiles recognise a monitor setup by name and resolution, so one layout applies when you dock and another when you undock. Apply a layout from a hotkey or the Quick Switcher (⌘⇧L) and every window goes back to its saved spot, including apps that were stranded. Its positioning code retries stubborn apps. It won't fix every misbehaving app, but it handles the usual offenders.

One thing from my own customer notes: the most common reason people buy Layoutish is that docking and undocking a laptop scatters their windows every time. Off-screen windows are the worst case of that same problem. Layoutish costs $9.99 once, with a 7-day free trial and no card needed. It needs macOS 13.5 or later and the same Device Control and Data Access permission as above, and never asks for Screen Recording.

If you want the longer story on automatic restoring, see how to put your windows back after you dock or wake your Mac and how to apply layouts when monitors change.

Common questions

How do I move all windows to my external monitor?

The quickest native way is to drag each window across, or make the external display your main one by dragging the white menu bar bar in System Settings → Displays → Arrange. For all of them at once, save a layout with the windows on that display and apply it with a hotkey. The full guide to moving windows to an external monitor covers both.

Why do my Mac windows move to the wrong screen when I reconnect a monitor?

macOS re-assigns windows to whichever display is available at the moment the screen changes, and it doesn't restore the previous arrangement when the monitor returns. If the display wakes slowly, windows land on the built-in screen and stay there. A saved layout tied to that display setup puts them back.

Is there a keyboard shortcut to bring a lost window back?

macOS has no single shortcut for it. ⌘Tab brings the app forward, and the Window menu's Center or Zoom does the rest. A window manager such as Rectangle or Layoutish lets you assign your own hotkey for it. In Layoutish, a hotkey needs ⌘ or ⌃ (or a function key on its own), because macOS 15 refuses ⌥-only shortcuts.

window managementexternal monitorLayoutishmacOStroubleshooting