BrowserWindow restores to previous display after minimize following display hot-plug (Windows)
Author: oalfroukhCreated Sep 24, 2026Updated Sep 25, 2026
Labelsblocked/need-info ❌bug :beetle:43-x-y
### Preflight Checklist
- [x] I have read the [Contributing Guidelines](https://github.com/electron/electron/blob/main/CONTRIBUTING.md) for this project.
- [x] I agree to follow the [Code of Conduct](https://github.com/electron/electron/blob/main/CODE_OF_CONDUCT.md) that this project adheres to.
- [x] I have searched the [issue tracker](https://www.github.com/electron/electron/issues) for a bug report that matches the one I want to file, without success.
### Electron Version
43.7.5
### What operating system(s) are you using?
Windows
### Operating System Version
Windows 11 Pro, build 10.0.22631
### What arch are you using?
x64
### Last Known Working Electron version
_No response_
### Does the issue also appear in Chromium / Google Chrome?
I don't know how to test
### Expected Behavior
After a secondary monitor is disconnected and then reconnected, and the window has moved back onto it, minimizing and then restoring the window should keep it on that same monitor.
### Actual Behavior
1. Open the app so its window sits on Screen 2 (a secondary/extended display).
2. Disconnect Screen 2. Windows moves the window to Screen 1.
3. Reconnect Screen 2. Windows moves the window back to Screen 2.
4. Minimize the window.
5. Restore it (click the taskbar icon).
6. The window reappears on Screen 1 instead of Screen 2, even though it was visibly on Screen 2 immediately before being minimized.
Reproduced with a completely default, unmodified `BrowserWindow` — no app code touches window position on `minimize`/`restore`/`show`.
### Testcase Gist URL
https://gist.github.com/oalfroukh/3eb9ee4387c855c4710dede1da9b8d5b
### Additional Information
This has a real privacy impact for anyone sharing a secondary monitor (e.g. presenting to a remote audience) while keeping other apps on a private primary monitor: minimizing and restoring an unrelated app can make it reappear on the shared screen and expose private content.
In-depth investigation
This looks like Windows' `WINDOWPLACEMENT.rcNormalPosition` (the rect used to restore a minimized window) isn't refreshed when the OS auto-relocates the window during the temporary disconnect/reconnect, so restoring from minimize replays the stale placement from the disconnect step instead of the window's actual, current position.
Source: electron/electron