← Back to Blog

Troubleshooting | May 26, 2026 | 7 min read

Why Do App Windows Move When You Unplug a Monitor?

By Mohit Sehrawat

Why Do App Windows Move When You Unplug a Monitor? — Edge Drop Guide

Unplugging a monitor from a multi-monitor Windows setup sometimes causes every window on the disconnected display to scramble onto the remaining monitor, often in the wrong position and at the wrong size. The clipboard shelf, if it was on the disconnected monitor, may end up off-screen entirely or on the wrong display. The same problem affects IDE windows, browser windows, and any application that does not handle the monitor change gracefully. The root cause is monitor ID reassignment, and the fix is per-monitor persistence in the apps that support it. This guide covers what happens when a monitor disconnects, why some apps recover and others do not, and what to look for in a clipboard tool.

For neighbouring topics, see laptop plus monitor: which screen should hold history, DPI mixing: blurry overlays on a secondary screen, clipboard tools on multi-monitor Windows setups, and ultrawide screens and modal clipboard popups. For the docking-station variant, see docking stations that rearrange displays.

What happens when a monitor disconnects

When a monitor is unplugged (or the display driver stops reporting it), Windows sends a WM_DISPLAYCHANGE message to every top-level window. The message tells each window that the display configuration has changed and that the window should verify its position is still valid.

The window's response depends on the application:

  • Well-behaved apps check whether their current position is still within the new virtual screen (the bounding rectangle of all connected monitors). If the position is off-screen, the app moves itself onto the nearest visible monitor, preserving its size and z-order.
  • Poorly-behaved apps ignore the message or handle it incorrectly. Their windows may remain at the old position, which is now off-screen, and become inaccessible.
  • Apps with per-monitor persistence record their monitor choice separately from their pixel position. When the configured monitor is disconnected, they fall back to a primary monitor; when the monitor is reconnected, they restore the saved position.

The first category is the minimum acceptable behaviour. The third category is what a clipboard shelf should aim for.

Why monitor IDs change

Windows assigns each connected monitor a numeric identifier, but the identifier is not stable across reboots or across display configuration changes. The identifier is based on the order in which monitors are detected, which can vary depending on the GPU, the driver, and the connection order.

A monitor that was "Display 2" in one session may be "Display 1" in the next, if it is detected first. A monitor that was connected via DisplayPort may be assigned a different identifier than the same monitor connected via HDMI. Docking stations can reassign identifiers when they are connected or disconnected.

This instability is the root of the "windows scramble on disconnect" problem. An app that records its position as "Display 2, x=1920, y=0" may find that Display 2 is a different monitor in the next session, and its window ends up on the wrong display.

How well-behaved apps persist

Apps that handle monitor disconnection correctly use one of two strategies:

Strategy 1: persist by display name

The app records the monitor's display name (e.g., "DELL U2723QE") rather than its numeric identifier. On startup, the app searches the connected monitors for the recorded name and places itself on the matching monitor. If no match is found, the app falls back to the primary.

This strategy is robust against identifier reassignment but fragile against monitor replacement. If the developer replaces the monitor with a different model, the display name changes, and the app does not recognise it.

Strategy 2: persist by resolution and position

The app records the monitor's resolution and its position in the virtual screen (e.g., "2560x1440, offset (1920, 0)"). On startup, the app searches for a monitor with the matching resolution at the matching position. If found, the app places itself there.

This strategy is robust against monitor replacement (any monitor with the same resolution at the same position matches) but fragile against configuration changes. If the developer changes the resolution or the monitor's position in the display settings, the app does not recognise it.

Most well-behaved apps use a combination: they try to match by name first, then fall back to resolution and position, then fall back to the primary monitor. This combination is robust against most changes.

How Win+V handles disconnection

Win+V is a shell component, not a standalone app. It does not have a "position" in the traditional sense — its panel is rendered on demand at the location of the foreground window. When a monitor disconnects, Win+V's panel simply appears on whatever monitor the foreground window is on. There is no persistence to worry about.

This is one of Win+V's strengths: it has no position to lose. The cost is that it has no fixed position to remember, which is the multi-monitor problem discussed in clipboard tools on multi-monitor Windows setups.

How a clipboard shelf should handle disconnection

A clipboard shelf that anchors to a chosen monitor should:

  1. Persist the monitor choice by name and resolution. Not by numeric identifier, which is unstable.
  2. Fall back to the primary monitor when the configured monitor is disconnected. The shelf should remain usable, not disappear.
  3. Restore the saved position when the configured monitor is reconnected. The shelf should return to its chosen monitor without manual reconfiguration.
  4. Handle the WM_DISPLAYCHANGE message promptly. The shelf should detect the disconnection within a second and relocate if needed.

Edge-Drop implements this pattern. The monitor and edge choice is persisted by display name, with a fallback to resolution and position. On disconnection, the shelf moves to the primary monitor. On reconnection, the shelf returns to the saved monitor.

For more on this configuration, see how to pick which monitor Edge-Drop uses.

Common failure modes

The shelf ends up off-screen

A shelf that does not handle WM_DISPLAYCHANGE may keep its old position, which is now off-screen. The shelf is still running (the process is alive, the tray icon is present), but its window is not visible. The developer has to right-click the tray icon and select "Reset position" or similar to bring the shelf back.

The fix at the OS level: there is none. The fix is to use a shelf that handles the message correctly.

The shelf moves to the wrong monitor

A shelf that uses numeric identifiers for persistence may end up on a different monitor than expected after a reboot or a display configuration change. The shelf is visible, but in the wrong place.

The fix: reconfigure the shelf's monitor in settings. The shelf will persist the new choice until the next identifier reassignment.

The shelf's size or DPI is wrong

When a monitor disconnects, the remaining monitor may have a different DPI setting. A shelf that was rendering at 150% scaling on a 4K monitor may end up rendering at 100% scaling on a 1080p monitor, looking too small. Or the reverse: a shelf that was at 100% on a 1080p may end up at 150% on a 4K, looking too large.

The fix: ensure the shelf is per-monitor DPI aware. The shelf should detect the DPI of its current monitor and scale its UI accordingly. This is a developer-side configuration; the user cannot fix it.

For more on the DPI issue, see DPI mixing: blurry overlays on a secondary screen.

What to look for in a clipboard tool

When evaluating a clipboard shelf or manager for a multi-monitor setup, the questions to ask:

  • Does the tool persist its monitor choice across reboots?
  • Does the tool fall back to the primary monitor when the configured monitor is disconnected?
  • Does the tool restore the saved position when the monitor is reconnected?
  • Does the tool handle DPI changes correctly when the monitor changes?
  • Does the tool respond to WM_DISPLAYCHANGE promptly (within a second)?

A tool that answers "yes" to all five is suitable for a multi-monitor setup that involves docking and undocking. A tool that answers "no" to any of these will produce friction.

For the broader buying-guide perspective, see questions to ask before installing a clipboard app and how to trial a clipboard app for seven days.

A short checklist

  • Unplugging a monitor triggers WM_DISPLAYCHANGE, which every well-behaved app should handle.
  • Monitor identifiers are unstable across reboots and configuration changes; apps should persist by display name and resolution.
  • A clipboard shelf should fall back to the primary monitor when its configured monitor is disconnected.
  • The shelf should restore its saved position when the monitor is reconnected.
  • DPI changes between monitors require per-monitor DPI awareness.
  • Test a clipboard tool by docking and undocking during a trial period.

Related reading

Sources

Mohit Sehrawat
Written by Mohit Sehrawat · Author & Software Tester

Mohit Sehrawat is a B.Tech Computer Science Engineering student with a focus on software testing, bug detection, and product quality. He is interested in exploring applications, identifying issues, and improving the overall user experience through thorough testing.

GitHub · LinkedIn

Copy. Stack. Drop.

Transform your clipboard into an interactive edge shelf. Stack, pin, and drag assets into any app with zero friction.

Download for Windows Get from Microsoft Store

How to Install Guide · First 10 Minutes Guide · Drag & Drop Guide · Edge-Drop vs Win+V · Support

Free · Lightweight · Privacy First
Find us on CodeHype