D11573: Use QPlatformWindow::startSystemMove() with Qt 5.11
volkov abandoned this revision. volkov added a comment. Moved to https://invent.kde.org/plasma/breeze/-/merge_requests/7 REPOSITORY R31 Breeze REVISION DETAIL https://phabricator.kde.org/D11573 To: volkov, #breeze Cc: graesslin, davidedmundson, broulik, plasma-devel, Orage, LeGast00n, The-Feren-OS-Dev, cblack, jraleigh, zachus, fbampaloukas, ragreen, ZrenBot, ngraham, himcesjf, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, ahiemstra, mart
D11573: Use QPlatformWindow::startSystemMove() with Qt 5.11
graesslin added a comment. In general I like the idea and that should be extended to Wayland as well, but private API is a no-no for breeze. That has huge runtime breakage potential. REPOSITORY R31 Breeze REVISION DETAIL https://phabricator.kde.org/D11573 To: volkov, #breeze Cc: graesslin, davidedmundson, broulik, plasma-devel, ZrenBot, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, mart
D11573: Use QPlatformWindow::startSystemMove() with Qt 5.11
volkov added a comment. IIRC, the X server floors coordinates, while Qt rounds them. REPOSITORY R31 Breeze REVISION DETAIL https://phabricator.kde.org/D11573 To: volkov, #breeze Cc: davidedmundson, broulik, plasma-devel, ZrenBot, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, mart
D11573: Use QPlatformWindow::startSystemMove() with Qt 5.11
davidedmundson added a comment. > Note that now globalPos is used when creating QMouseEvent that > triggers window movement. Otherwise QMouseEvent will take it > from QCursor::pos() with integer coordinates received from the > X server, which may differ from coordinates rounded by Qt for > touch events. Can you expand on this, I don't understand why Qt would have different positions for synthesised touch events REPOSITORY R31 Breeze REVISION DETAIL https://phabricator.kde.org/D11573 To: volkov, #breeze Cc: davidedmundson, broulik, plasma-devel, ZrenBot, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, mart
D11573: Use QPlatformWindow::startSystemMove() with Qt 5.11
volkov added a comment. https://codereview.qt-project.org/224251 REPOSITORY R31 Breeze REVISION DETAIL https://phabricator.kde.org/D11573 To: volkov, #breeze Cc: davidedmundson, broulik, plasma-devel, ZrenBot, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, mart
D11573: Use QPlatformWindow::startSystemMove() with Qt 5.11
davidedmundson added a comment. +++ to using this. However, I think we should at least try to get this as public API in Qt, rather than using internals. Breeze is far from the only case where someone would want to do this and QWindow has other system calls it seems to make sense to me. REPOSITORY R31 Breeze REVISION DETAIL https://phabricator.kde.org/D11573 To: volkov, #breeze Cc: davidedmundson, broulik, plasma-devel, ZrenBot, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, mart
D11573: Use QPlatformWindow::startSystemMove() with Qt 5.11
broulik added inline comments. INLINE COMMENTS > breezewindowmanager.cpp:100 > +#if QT_VERSION >= QT_VERSION_CHECK(5, 11, 0) > +#include > #endif Using private API will lock Breeze to that specific Qt version it was compiled with, requiring a rebuild. This has imho shown to be quite painful in plasma-integration and Kwin already. REPOSITORY R31 Breeze REVISION DETAIL https://phabricator.kde.org/D11573 To: volkov, #breeze Cc: broulik, plasma-devel, ZrenBot, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, mart
D11573: Use QPlatformWindow::startSystemMove() with Qt 5.11
volkov created this revision. Restricted Application added a project: Plasma. Restricted Application added a subscriber: plasma-devel. volkov requested review of this revision. REVISION SUMMARY ... instead of X11 API to initiate window movement by a window manager. It works correctly when mouse events are synthesized from touch events (requires releasing of touch sequences that relies on Qt's internals and can be done only inside the xcb plugin). Besides it should work on Wayland. Note that now globalPos is used when creating QMouseEvent that triggers window movement. Otherwise QMouseEvent will take it from QCursor::pos() with integer coordinates received from the X server, which may differ from coordinates rounded by Qt for touch events. REPOSITORY R31 Breeze BRANCH Plasma/5.12 REVISION DETAIL https://phabricator.kde.org/D11573 AFFECTED FILES kstyle/CMakeLists.txt kstyle/breezewindowmanager.cpp To: volkov Cc: plasma-devel, ZrenBot, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, mart