Docking guide

MacBook windows rearrange when docking? Restore your layout

Why it happens on connect, and how to get the same layout every time you dock. Updated November 19, 2026.

If MacBook windows rearrange when you connect a dock or external monitor, first check the display arrangement and main display in System Settings. For repeatable whole-workspace restore, save a Desk layout while docked and a Laptop layout while unplugged, then arm the appropriate monitor-connect, disconnect or matching-layout trigger in SnapState. For positions of already-open windows alone, its Display Memory option can remember each display setup without a named workspace; app relaunch and browser tabs need a workspace.

Get SnapState for $9.99One-time purchase · up to three Macs · 14-day refund · macOS 15.7 or later
Save a workspace, then restore its app windows, Spaces and browser tabs.

What happens when you plug in a dock

The Mac sees new displays appear, often one after another, and recalculates the screen layout each time. Windows get moved to fit, and the display order may differ from last time. This page is about connecting. For the opposite, see restoring windows after unplugging a monitor.

Things that make it worse

Hubs driving several displays

Multiple displays through one hub commonly connect at slightly different moments, so windows get shuffled more than once.

MacBook with two external monitors

Two externals can wake in different order, so windows shuffle more than once. See MacBook plus two external monitors: window layout.

Different monitors at home and at work

Each desk is a different screen setup, so one layout cannot fit both. See ultrawide layouts.

Lid closed vs open

Closing the lid removes the built-in screen from the layout. See clamshell mode.

Manual fixes

  • In System Settings, Displays, set the arrangement and main display to match your desk.
  • Assign apps to specific desktops from the Dock Options menu.
  • Plug in the display before waking the Mac, so the layout settles once.

Automatic fix with SnapState

  1. Arrange your windows at the desk the way you like them.
  2. Capture a workspace from the menu bar and name it Desk. Do the same unplugged and call it Laptop.
  3. Restore automatically: turn on the display connect and disconnect triggers, or press Control-Command-1 and 2.

SnapState remaps windows to the displays you have now, relaunches missing apps and reopens your browser tabs. Shortcuts for several layouts are covered in multi-monitor shortcuts.

No workspace needed for window positions alone: since SnapState 2.10.0, turn on Display Memory in Settings → Restore. SnapState records where your windows are on each display setup every minute and just before the Mac sleeps, and moves them back when that setup returns. It only moves windows that are already open; it does not relaunch apps or reopen tabs, which is what a workspace is for. If a workspace trigger fires for the same change, the workspace wins.

Home and office: one workspace per desk

Save one workspace for each desk you use. With a matching layout trigger, SnapState restores the one that fits the displays it sees. The full setup is in different window layouts for home and office monitors. Comparing tools? See the best Mac workspace managers, Display Maid and Stay, or why windows move after sleep.

Frequently asked questions

Why do my windows rearrange when I connect my MacBook to a monitor?

When a display connects, macOS has to place windows on a new set of screens with new sizes and order. It commonly guesses, and the result rarely matches how you had things last time.

Is there an app that remembers window positions for each monitor setup on Mac?

Yes. SnapState saves a workspace per setup and can restore it automatically when a display connects or disconnects, including the apps and browser tabs. Stay and Display Maid also remember positions per display setup.

Can macOS remember layouts per display setup natively?

Not reliably. macOS has no feature to save a named layout for each display setup and restore it on connect.

Does SnapState work with Intel and Apple Silicon?

Yes. It is a universal app for both and needs macOS 15.7 or later.

How is this different from Display Maid or Stay?

All three restore window positions when displays change. SnapState also relaunches apps, reopens browser tabs, restores on wake, and lets you switch named workspaces with shortcuts.

Get SnapState for $9.99One-time purchase · up to three Macs · 14-day refund