WindowResizer icon indicating copy to clipboard operation
WindowResizer copied to clipboard

Issue restoring windows in multi-monitor environment

Open avengerx opened this issue 9 months ago • 0 comments

Currently v1.3.4+da97300 saves and restores all positions correctly.

But there's an issue where it restores all windows relative to the leftmost screen. This means it's not necessarily the monitor identified as "1" in display properties, and it is also not the display defined as the main display also in Display Properties.

Image Display settings, with the "main display" highlighted/selected, in blue

To reproduce the issue, what I did was:

Prerequisite: Ensure the settings have no window with the "auto" checkbox checked, so their positions are not automatically saved by the tool.

  1. Run the "Save All" task via context menu or shortcut. It saves all current windows' positions across the whole desktop. If you move/resize individual windows, they are correctly returned to their previous position/screen/dimensions.
  2. Hit win+L to lock the computer. Then turn off one or more DisplayPort monitors in the multi-monitors you have.
  3. Wait a few seconds, and turn them back on, and log in.
  4. The desktop is restored in a "mangled" state. In particular, with resized windows if one of the monitors that is left on is of a smaller resolution (like the screenshot above). Yet, some windows are preserved in their respective screens.
  5. Run the "Restore All" task via context menu or hotkey. All windows are moved to the screen 2 from the picture above, preserving their relative position to each original screen's (0,0) position. Windows are not resized back either.

Instead the tool should restore and use absolute (x,y) coordinates from the Main Display, thus preserving the position across multiple monitors. Something it normally does, but for some reason in this situation it fails.

Edit: Tested this with several ad-hoc save-restores and it works when no logout is made and no monitor is unplugged. It not only moves the windows back to the original screen, but also resizes them back to what they were when saved.

avengerx avatar Mar 23 '25 20:03 avengerx