Mac windows move when you disconnect a monitor: how to get your layout back
When an external display disconnects, macOS moves its windows to a screen that is still connected. Reconnecting does not always send them back, and sleep can cause the same shuffle. A few settings reduce it, and a saved OrbDesk setup puts every window back in one step.
Why macOS moves your windows
A window has to live on a connected screen. When you unplug a monitor, close the lid of a docked MacBook, or the monitor powers down, macOS treats that display as gone and gathers its windows onto a screen that remains, usually the built-in one.
When the display comes back, macOS tries to return windows to where they were. That works some of the time. It is less reliable when the monitor wakes slowly, when you connect a different monitor than before, or when windows were spread across several Desktops.
Settings that reduce the shuffle
These settings do not stop macOS from moving windows off a disconnected display, but they keep your Desktops predictable so windows have a stable place to return to.
- Open System Settings → Desktop & Dock → Mission Control and turn on Displays have separate Spaces. Each display then keeps its own set of Desktops. macOS may ask you to log out for the change to apply.
- In the same place, turn off Automatically rearrange Spaces based on most recent use if you want your Desktops to stay in a fixed order.
- If windows move every time the Mac sleeps, check your monitor’s own power settings. Some monitors disconnect completely when they sleep, which macOS sees as unplugging. A deep sleep or power saving option in the monitor’s menu is a common cause.
- Use the same port and cable for the same monitor where you can. macOS recognizes a display more reliably when it is connected the same way each time.
Put every window back with a saved setup
Settings only go so far, because macOS has no concept of a saved layout. OrbDesk adds one. Arrange your windows once, save the arrangement as a setup, and restore it whenever your Mac has shuffled things.
A setup records which apps are open, the position and size of each window, and the screen and Desktop each one belongs to. Try OrbDesk free for 7 days, then $14.99 USD once for one Mac.
- With your monitor connected and your windows where you want them, open OrbDesk and choose New setup.
- Give it a name, such as Desk or Docked, and save. Saving does not move any windows.
- After your windows have moved, reconnect the monitor, click OrbDesk in the menu bar, and choose the setup under Restore.
- OrbDesk moves each window back to its screen, Desktop, position, and size, then shows you the result.
Working on the laptop screen alone
You do not need a second setup for the days you work undocked. Restore the same setup with only the built-in display connected, and OrbDesk fits the saved screen groups onto it, keeping them on separate Desktops and scaling window sizes to the smaller screen.
The saved arrangement itself is not changed. Plug the monitor back in, restore again, and the windows return to the external display.
What to expect
Restoring is something you choose to do. OrbDesk does not move windows by itself when a display connects or the Mac wakes, so nothing shifts while you are in the middle of something.
Fullscreen windows and windows assigned to All Desktops are not part of a setup. Some apps limit how their windows can be moved or resized; when that happens the restore result names the window and the reason.