Skip to content
Back to all guides
macOS Guide

Why Mac Windows Move to the Wrong Screen After Sleep (and How to Fix It)

Published October 24, 20265 min read

You let your Mac sleep, come back, and every window that was on your external monitor is now stacked on the laptop screen. Here is why that happens, what is worth trying for free, and how to restore your setup without dragging anything.

Why Mac windows move after sleep

When a Mac sleeps, its displays sleep too. On wake, macOS can briefly report fewer displays than you really have connected, because a monitor, dock or adapter takes a few seconds to answer. While a monitor looks missing, macOS moves its windows to a screen that does exist. A moment later the monitor comes back, but the windows usually stay where they were put.

The same thing happens when you unplug a monitor, undock a laptop, or change a display's resolution. Slow docks and long adapter chains make it more likely.

Free things to try first

  1. Check “Displays have separate Spaces.” It is in System Settings → Desktop & Dock → Mission Control, and it is on by default. Some people report fewer windows and Dock jumps with it on. Changing it needs you to log out and back in.
  2. Assign apps to a desktop. Right-click an app in the Dock, choose Options → Assign To → This Desktop. This tells macOS which desktop the app belongs to, which can help it return windows to the right screen.
  3. Try a direct cable or another port. Some users find that a slow USB-C dock or adapter makes the problem worse than a direct connection.
  4. Update macOS. Display handling changes between releases.

These can reduce how often it happens. None of them remember your layout, so when windows do end up in the wrong place you still have to drag them back.

Put everything back in one click

Layr for Mac is a menu-bar app that saves your window layout and restores it. Arrange your windows the way you like, choose Save current windows, and Layr stores where every window goes, on every display.

  • Automatic: in Settings, “When a display connects or changes, rearrange” re-applies your active layout. It is on by default.
  • One click: pick the layout in the menu-bar panel, or run Fix My Workspace, which shows which windows would move before anything moves.
  • Undo: you can undo the last arrange.
  • Missing monitor: you choose whether a disconnected display's windows go to your main display or stay where they are.

In the developer's own test with a MacBook and an HDMI monitor, unplugging the monitor made Layr place the layout's windows on the built-in display within about two seconds. After plugging it back in, the windows were on the monitor in their saved positions. That was one MacBook and one monitor, so docks, sleep and other setups can behave differently.

What Layr does not do

  • It does not follow macOS Spaces. The public macOS API reports that the Space changed, but not which one.
  • It does not move full-screen windows, and it does not open apps for you.
  • It needs the Accessibility permission, because macOS only lets an app move other apps' windows with it.

Want the longer version on displays? Read managing multiple monitors on Mac, or see everything Layr does today.

Quick answers

Why do my Mac windows move to my laptop screen after sleep?
On wake, macOS can briefly see fewer displays than you have connected. Windows that were on a missing monitor are moved to a screen that exists, and macOS usually doesn't send them back when the monitor reappears a moment later.
Is there a macOS setting that saves window positions?
No. macOS has no built-in way to save a named window arrangement and restore it. Some apps reopen their own windows, but that doesn't move windows between displays.
Does Layr for Mac fix windows moving after sleep?
Layr re-applies your saved layout when a display connects or changes (a setting that is on by default), and Fix My Workspace puts windows back in one click. It doesn't follow macOS Spaces, and results depend on your monitor and dock.

Put your windows back in one click.

Try Layr for Mac free for 24 hours. No account, no credit card.