Summary: | [wayland] Showing and hiding titlebar and frames on a scaled display will cause XWayland windows to move diagonally by about 1px every time | ||
---|---|---|---|
Product: | [Plasma] kwin | Reporter: | Eamonn Rea <eamonnrea> |
Component: | decorations | Assignee: | KWin default assignee <kwin-bugs-null> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | nate |
Priority: | NOR | ||
Version: | 6.1.0 | ||
Target Milestone: | --- | ||
Platform: | Other | ||
OS: | Linux | ||
Latest Commit: | https://invent.kde.org/plasma/kwin/-/commit/84e3ff88c3337db72de7458ff8c1500c0d3e11c3 | Version Fixed In: | 6.2.0 |
Sentry Crash Report: |
Description
Eamonn Rea
2024-06-23 02:56:08 UTC
I cannot reproduce this on my laptop with just a single screen connected, so perhaps this is specific to display configurations with one scaled display and at least one regular display? My Desktop always has multiple monitors connected so it is most easily reproducible there. Can you share the geometry of dolphin window on your PC? Type "kwin" in krunner, click "Open KWin debug console" and expand dolphin entry in the windows tab. Then look for bufferGeometry, clientGeometry, and frameGeometry. Also what window decoration settings do you use? . This is the geometry of the Dolphin window under X11 windows, with Dolphin being run with `QT_QPA_PLATFORM=xcb dolphin`. bufferGeometry: 895.333,1329.33 1376x919.333 clientGeometry: 895.333,1329.33 1376x919.333 frameGeometry: 894,1296 1379.33x954.667 At first I manually entered these, as I didn't realise double-clicking on the entry in the KWin Debug Console would copy them over. As for window decoration settings, I use standard Breeze Dark decorations, with Button Size set to Large. I don't believe I have any other esoteric settings, at least nothing that has changed in the last few years. A possibly relevant merge request was started @ https://invent.kde.org/plasma/kwin/-/merge_requests/6030 Git commit 84e3ff88c3337db72de7458ff8c1500c0d3e11c3 by Vlad Zahorodnii. Committed on 02/07/2024 at 11:25. Pushed by vladz into branch 'master'. Round X window gravity adjustment Qt applications use Static window gravity by default. This means that if a window decoration is created, the client window should remain at the same position in the global coordinate space. To do that, X11Window needs to move the frame geometry by (-borderLeft(), -borderTop()). On the other hand, after making X11Window::framePosToClientPos() round the window borders, the client window can end up being moved more than expected when applying the gravity adjustment. This change makes X11Window also round the gravity adjustment so the math is consistent there and in the framePosToClientPos() function. M +16 -16 src/x11window.cpp https://invent.kde.org/plasma/kwin/-/commit/84e3ff88c3337db72de7458ff8c1500c0d3e11c3 Super cool, thank you for fixing it so quickly! |