Closed star-buck closed 8 years ago
Found it! The Bin Laden of bugs.
Deep deep down in the Qt XCB backend there is a line:
if (qt_window_private(window())->positionAutomatic)
tell kwin the position and size
else tell kwin the size
positionAutomatic starts true and is set to false on any call to setGeometry(); so if you explicitly set geometry to 0,0 it will till the WM we have a position.
However, setX, setY have a check before to see if it's doing a no-op, so this flag never gets unset. IMHO it's a bug in QWindow there, and I'll write a patch for Qt there.
It only happens once because afterwards kwin moves the window, which ends up calling a setGeometry in QWindow.
However, I think we want an early bodge. Either I set X to -1 before we show it and set it back to 0 in Desktop.qml or we put a random setGeometry call into dialog.
I am awesome.
Fix: https://codereview.qt-project.org/#/c/123989/
Workaround: https://git.reviewboard.kde.org/r/124869/
Edit: s/11/1
Have it running from last 1 hours..
No more widget explorer in center of screen.. :+1:
which qt is needed? i get this bug in manjaro with plasma 5.4.0 and Qt5.5.0.
I just missed 5.4.0 workaround is in plasma 5.4.1
Real fix is going to be in Qt5.6
tested official plasma 5.4.1 from arch and dialog still comes up in middle.
This bug was/is really crazy to get right.. It required special effort to reproduce it even when I reported.. but since this workaround is added I am unable to reproduce this at all.. but maybe I will have to try harder..
now it does come up on the left first time, but takes quite a few seconds to come up at all. can be due to loading initially, but nevertheless seems sluggish...
the dialog comes up somewhere in the middle the first time invoked, then comes up on the left side after that.