Mac Windows Move After Sleep or Unplugging a Monitor? How to Keep Them in Place

You wake your Mac or plug your laptop back into its dock, and the windows that belonged on your external monitor are stacked on the laptop screen. This guide explains why that happens, which macOS settings reduce it, and how to have every window returned to its display automatically.

Published by BetterStage, the maker of the app recommended here.

The short answer

When macOS loses a display, even briefly while a monitor sleeps or a dock reconnects, it moves that display’s windows onto a screen that is still connected. It does not reliably move them back. macOS has no setting that restores the layout. BetterStage’s Workspace Continuity waits for your displays to settle, recognizes each monitor, and puts its windows back.

Your workspace

Stages & window assignments
Each display's Window Mode
TabStack panes & tab groups

Automatic recovery · Free

After restart, wake, or display changes

Saved Workspaces · Pro

Save a named setup. Load it when needed.

Schematic. Workspace Continuity recovers your desk automatically. Pro adds named Saved Workspaces you can load on demand. Data stays on this Mac.

Automatic Workspace Continuity is in the Free tier. Pro adds named Saved Workspaces you can load on demand.

What macOS can do on its own

These settings don’t restore window positions, but they keep your desktops in a predictable order and send apps to the right screen when they open.

  1. Open System Settings > Desktop & Dock and, under Mission Control, turn off “Automatically rearrange Spaces based on most recent use” so your desktops keep their order.
  2. For an app that belongs on one monitor, Control-click its Dock icon, choose Options, and under Assign To choose Desktop on Display, followed by that display’s number. The app then opens on that display.
  3. If a monitor drops off whenever it sleeps, check its on-screen menu for a deep-sleep or auto-input-switch option and try turning it off, because that can make the Mac treat a sleeping screen as unplugged.

Where the built-in options stop

  • Assign To decides where an app opens. It doesn’t move windows that are already open back after a reconnect.
  • Nothing in macOS remembers per-display window positions across sleep, docking, and undocking.
  • Monitor menus differ by model, so the sleep setting is not available on every display.

How BetterStage puts windows back

Workspace Continuity keeps a local checkpoint of your Stages, window positions, and each display’s layout. It covers app restart, wake from sleep, docking, undocking, and display reconnects.

  1. Install BetterStage and allow Accessibility. Workspace Continuity is on by default.
  2. Arrange your windows across your displays the way you like them.
  3. When a display disconnects, its windows stay usable on the screens that remain, and BetterStage remembers where they came from.
  4. When the display returns, BetterStage matches it by its hardware identity (model, serial, resolution, and position) and restores its windows and layout. It asks first only when it needs your confirmation.

To restore reconnected displays without a prompt, turn off “Ask before restoring a reconnected display” in Settings > Workspaces. Layouts you have already changed elsewhere are left as they are.

Common questions

Why do my windows move to the laptop screen when my Mac wakes up?

Some monitors and docks disconnect while asleep and take a few seconds to come back. For that moment, macOS sees one fewer display and moves its windows to a screen that is still connected. When the monitor reconnects, those windows usually stay where macOS put them.

Does this work when I dock and undock a MacBook every day?

Yes. BetterStage remembers each display arrangement you use, such as the laptop alone, one external monitor, or a full desk, and restores the matching layout once that arrangement settles.

What if BetterStage can’t tell two identical monitors apart?

It uses the model, serial number, resolution, and position together. If it still can’t match a display confidently, it shows a Review Displays prompt instead of guessing, and BetterStage stays usable while you decide.

Related guides

Sources

Stop rebuilding your desk every morning

Let BetterStage remember where each window belongs on each display, and bring it back after sleep, docking, or a monitor reconnect.

By BetterStage · features updated for 2.3.4 on