Details
-
Bug
-
Resolution: Duplicate
-
P3: Somewhat important
-
None
-
5.15.2
-
None
Description
I'm getting some reports that application window can't be moved (it uses QWindow::startSystemMove). At the same time, some of they say that it works if applciation is restarted. One of the reporters confirmed that adding timeout to autostart desktop file helps (Xfce 4.12 from Xubuntu 18.04). Although, there's a case with GNOME Wayland: the problem is reproducible even when app is not autostatrted, I guess that's due to Xwayland starting on demand (so it starts simultaneously with the app and the race condition is in action).
Some digging to Qt source code shows that startSystemMoveResize has a check:
But it checks a vector pre-filled when QXcbConnection was estabilished:
https://github.com/qt/qtbase/blob/5.15/src/plugins/platforms/xcb/qxcbwmsupport.cpp#L54-L57
https://github.com/qt/qtbase/blob/5.15/src/plugins/platforms/xcb/qxcbconnection.cpp#L110
So, if Qt app is started earlier than WM filled _NET_SUPPORTED property, it will run in a broken way. Non-working startSystemMoveResize is an obvious sign, but isSupportedByWM is used in a lot of other places.
Apparently, Qt should update the vector at some point to work properly in such environments.