KDAB / KDDockWidgets

KDAB's Dock Widget Framework for Qt
https://www.kdab.com/development-resources/qt-tools/kddockwidgets
Other
755 stars 164 forks source link

Windows can restore out of bounds when restoring on recently upscaled displays #390

Open Cuperino opened 1 year ago

Cuperino commented 1 year ago

On Windows, storing layout with window positioned near corner on high resolution display, closing that window, increasing display scaling factor by a factor of 2 or more, and then restoring the layout results in window being positioned out of bounds, on the next display, when there's a display next to the initial display.

This issue is also applicable to restoring the position of individual windows, not just entire layouts. The issue is not applicable to Linux, tested Plasma and Gnome, each with X11 and Wayland. I didn't test MacOS.

Pre-requirements

To replicate

  1. Open qtwidgets_dockwidgets example
  2. Make mainwindow small and place to the top left of the first display. Make second window smaller and place very near to the next display kddw_W
  3. Save layout
  4. Close second window kddw_X
  5. Increase scale factor of first display kddw_Y
  6. Restore layout kddw_Z

Outcome

Expectation