KDDockWidgets icon indicating copy to clipboard operation
KDDockWidgets copied to clipboard

Floating windows increase size on restoration

Open bbc131 opened this issue 11 months ago • 3 comments

When I save and restore the layout of some dockwidgets, I experience the problem, that floating windows are restored with an increased size.

This can be reproduced with the kddockwidgets_example: I placed two floating windows in front of the mainwindow (mainwindow is restored correctly). Then I simply save the layout and restore it again via Save Layout / Restore Layout in the File menu. On restore, the two floating windows change their size as can be seen in the screenshots.

Before 20230704_before

Restored 20230704_after

Two observations:

  1. This happens only if I place the mainwindow on screen 1 or 2 of my 3 screens. When I place the mainwindow on screen 3, it works perfectly fine. It is independent of where the floating windows are placed. This means, I can place one floating window on each screen and depending on where the mainwindow is placed, the problem occurs for all or for none of the floating windows. I'm using Win10 with three screens aligned as can be seen below. Screen 3 is the primary screen. 20230704_screen_setup

  2. If the problem occurs, I get the following prints:

QWindowsWindow::setGeometry: Unable to set geometry 213x148-2701+57 (frame: 213x148-2701+57) on QWidgetWindow/"KDDockWidgets::FloatingWindowClassWindow" on "\\.\DISPLAY2". Resulting geometry: 229x187-2709+26 (frame: 229x187-2709+26) margins: 0, 0, 0, 0 minimum size: 35x38 MINMAXINFO maxSize=0,0 maxpos=0,0 mintrack=35,38 maxtrack=0,0)
QWindowsWindow::setGeometry: Unable to set geometry 241x176-2756+316 (frame: 241x176-2756+316) on QWidgetWindow/"KDDockWidgets::FloatingWindowClassWindow" on "\\.\DISPLAY2". Resulting geometry: 257x215-2764+285 (frame: 257x215-2764+285) margins: 0, 0, 0, 0 minimum size: 35x38 MINMAXINFO maxSize=0,0 maxpos=0,0 mintrack=35,38 maxtrack=0,0)

This reminds me on issue #358, maybe it is related.

bbc131 avatar Jul 04 '23 06:07 bbc131