Qt 6.9.0 + master result in broken windows on Ubuntu 22.04
Building with current Qt-Advanced-Docking-System master or last release tag with Qt 6.9.0 works since my pr, but the issues go further.
- checkout and do a full build with Qt 6.9.0 or 6.8.3 or 6.7.3
- run ./x64/bin/CentralWidgetExample
- drag any tabbed widget out of its tabbing area
- the result is a broken and flickering main window:
System: Ubuntu 22.04.5 LTS Everything works fine on Windows 10.
It seems to be the same as #713
So it seems Qt6 + Ubuntu never worked. Qt5 is EOL next month, am I the only one using it on Linux? When I start dragging the tab, the indicators are already wrong / outside the actual window. When i drop the tab and start floating it, that's when the main window breaks like in my first screenshot. If i drop the tab inside an existing tab widget, it works fine (though I cant always drop it since the indicators are off).
Any ideas where I should start looking?
It seems that under Wayland there is no good way to get the current global cursor position, and indeed QCursor::pos() returns garbage on Qt6 + Wayland. Many things changed in the Qt Wayland backend from qt5 to qt6, though I am not sure why or how it worked in Qt5.
@FelixBer In KDDockWidgets they use QDrag instead of mouse events for handling the dragging: https://github.com/KDAB/KDDockWidgets/blob/main/src/qtcommon/DragControllerWayland_p.cpp
Maybe this could also be a solution for ADS.
ADS is using QCursor::pos() in several places. We could probably fix the dragging-preview of the floatingwidget by using QCursor::setPixmap(), but that still leaves many other cases like the orange drop indicators and probably more invisible internal things...
KDAB seems to be using something->mapToGlobal(Qt5Qt6Compat::eventPos(ev))), that might be a short term solution?
Thanks for looking into it, but that's just a wrapper to deal with QPoint/QPointF and mapToGlobal is what doesnt work inside QCursorPos, so it's the same result.