blue-systems / plasma-5.5

Plasma 5.2 - 5.5
0 stars 0 forks source link

[add widgets]: dialog does not come up on the left side default when invoked the first time #139

Closed star-buck closed 8 years ago

star-buck commented 8 years ago

the dialog comes up somewhere in the middle the first time invoked, then comes up on the left side after that.

bhush9 commented 8 years ago

https://bugs.kde.org/show_bug.cgi?id=332702

davidedmundson commented 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.

davidedmundson commented 8 years ago

I am awesome.

Fix: https://codereview.qt-project.org/#/c/123989/

Workaround: https://git.reviewboard.kde.org/r/124869/

star-buck commented 8 years ago

e-_george_bush_mission_accomplished

bhush9 commented 8 years ago

Edit: s/11/1

Have it running from last 1 hours..

No more widget explorer in center of screen.. :+1:

star-buck commented 8 years ago

which qt is needed? i get this bug in manjaro with plasma 5.4.0 and Qt5.5.0.

davidedmundson commented 8 years ago

I just missed 5.4.0 workaround is in plasma 5.4.1

Real fix is going to be in Qt5.6

star-buck commented 8 years ago

tested official plasma 5.4.1 from arch and dialog still comes up in middle.

bhush9 commented 8 years ago

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..

star-buck commented 8 years ago

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...