Deskback

Why your Mac moves windows after sleep (and how to stop it)

You come back to your desk, wake the Mac, and every window is piled on the laptop screen. The external monitor is on. Your layout is gone.

Updated October 22, 2026 · 5 min read

The short answer

When your Mac or your monitor goes to sleep, the external display can drop its connection for a moment. To macOS, that looks exactly like unplugging it. So it does what it always does when a screen disappears: it moves every window from that screen onto the ones that are left — usually the built-in display.

When the monitor comes back a few seconds later, macOS doesn’t always move the windows back. Sometimes it does, sometimes it moves half of them, sometimes none. That inconsistency is what makes it so annoying.

Why it’s worse in some setups

What helps without installing anything

None of these remember where each window was. They only reduce how often the layout breaks.

What doesn’t help

The fix: let something remember the layout for you

The real fix is to remember where every window was for each monitor setup, and put it back when that setup returns. That’s what Deskback does. It watches for sleep, wake and display changes, waits for macOS to settle, then restores every window to the position and size it had — including several windows of the same app. If it isn’t sure which window is which, it leaves it alone.

It runs in the menu bar, needs only the Accessibility permission, and nothing leaves your Mac.

Get early access — $9 launch price

FAQ

Why does my Mac move windows after sleep?

When the Mac or the display sleeps, an external monitor can briefly disconnect. macOS moves its windows to the screen that is left and doesn’t always move them back when the monitor returns.

Is there a setting in macOS to stop it?

There’s no single setting that remembers window positions per monitor. Keeping the same ports and avoiding display sleep while docked helps; an app can restore the layout automatically.

Does this happen with an Apple Studio Display too?

It can happen with any external display, because the cause is the display reconnecting, not the brand.

Related

External monitor rearranges your windows on Mac? Fixes that work