Why do my windows move to my MacBook screen after sleep?
A common cause is that an external display wakes more slowly than the Mac. For a moment macOS sees fewer screens, moves windows onto the one it can see, and does not always move them back.
Troubleshooting guide
When a Mac wakes, its displays have to be detected again. Commonly an external monitor reports in a moment late, macOS briefly sees fewer screens, and gathers windows onto the one it can see. When the other screen returns, the windows often stay where they were moved. The settings below can reduce it, and SnapState fixes it by restoring your layout automatically on wake.
The Mac and each monitor wake on their own timing. If a display is late, macOS may treat it as disconnected for a moment.
Displays behind a USB-C or Thunderbolt dock commonly take longer to come back. See windows rearranging when you dock.
Switching a monitor to another input looks like a disconnect to macOS. See switching monitor input.
If the main display or arrangement shifts, windows follow. See display arrangement changes.
The Mac can stay awake while the display turns off after you lock the screen or the screensaver starts. Many monitors drop their connection then, and windows move the same way. See windows moving after the lock screen.
The Mission Control option "Displays have separate Spaces" changes how windows are tied to each screen, so it is worth testing both ways.
These help some setups and not others. Try them one at a time.
Arrange your windows, capture a workspace from the menu bar, and turn on the wake from sleep and display connect triggers. On wake SnapState puts windows back on the right displays, relaunches missing apps and reopens your browser tabs. You can also press Control-Command-1 to 6 any time. $9.99 one-time, up to three Macs, macOS 15.7 or later.
A common cause is that an external display wakes more slowly than the Mac. For a moment macOS sees fewer screens, moves windows onto the one it can see, and does not always move them back.
Try keeping the external display on a direct connection, checking your display arrangement and main display, and assigning key apps to desktops. If windows still move, SnapState can restore your saved layout automatically on wake.
Reports continue on recent macOS versions. See our macOS 27 guide for what changed and what still happens.
It can. Closing the lid changes which displays are active, which commonly triggers the same rearranging. See the clamshell mode guide.
Yes. SnapState can restore a saved workspace on wake from sleep and when a display connects, putting windows, apps and browser tabs back.