Windows move when you undock your laptop? How to keep them in place

You unplug the laptop from the dock and every window lands on the small built-in screen. You plug it back in and only some of them return to the big monitors. Here is why it happens and three ways to fix it, from the free setting already in Windows to a tool that does it for you.

Why it happens

A window has to live on a screen that exists. When you undock, the external monitors disappear, so Windows moves every window that was on them onto the laptop screen. So far, so reasonable.

The trouble starts when you dock again. Windows does not always know where each window was before, especially if the monitors come back in a different order, at a different resolution, or after the laptop went to sleep. Some windows go back, others stay piled on the laptop screen, and you drag them one by one.

A restart makes it worse: Windows does not reopen your apps in their old positions at all.

Fix 1: the Windows 11 setting

Windows 11 has a built-in option for this. Open Settings → System → Display → Multiple displays and tick:

  • Remember window locations based on monitor connection: Windows tries to put windows back on the monitor they were on when that monitor returns.
  • Minimize windows when a monitor is disconnected: optional. Windows minimizes the windows of the missing monitor instead of piling them onto the laptop screen.

Try this first: it is free and already on your PC. Its limits are that it only exists on Windows 11, it only works while the apps stay open, it does nothing after a restart, and it does not let you save a layout and return to it later.

Fix 2: PowerToys Workspaces

PowerToys Workspaces is a free Microsoft tool. You arrange your apps once, save the arrangement as a workspace, and launch it later from the editor or a desktop shortcut. It opens the apps that are not running and puts each window in its saved position.

Turn on the workspace's Move existing windows option, otherwise some apps that are already open will get a second window.

Its limit is that it only runs when you launch it. It has no option to run by itself when you sign in, and it does not notice when you dock or undock. You can make it run at sign-in with a Task Scheduler task "At log on" that opens the workspace's desktop shortcut, but you have to set that up for each workspace yourself.

Fix 3: a tool that does it on its own

If you want nothing to click, you need a program that watches the monitors for you. That is the reason I wrote Monitile, a small app that sits in the notification area:

  • you save how your windows are arranged across your monitors, once;
  • when the monitor setup changes, for example when you dock or undock, it moves the open windows back into place by itself;
  • when you sign in, it restores the layout, moving the windows that are already open and launching only the apps that are missing.

All of this is in the free version, with no time limit. A paid Pro version (€3.99 + VAT, once) adds automatic choice of the right layout for the screens you have plugged in, keyboard shortcuts and continuous saving of the layout.

Monitile has no account and no telemetry, and it works offline. It saves only program, monitor and position of each window, never your documents, folders or web addresses. The installer is not code-signed, so Windows shows a SmartScreen warning the first time; the download page explains how to check the file.

Download Monitile free

Which one to pick

If you…Use
are on Windows 11 and only need windows to go back after docking The Windows 11 setting
want to open a set of apps in fixed positions with one click PowerToys Workspaces
want the layout back at sign-in and after every dock, without clicking Monitile
are on Windows 10 Workspaces or Monitile: Windows 10 has no built-in setting