SUMMARY When using XWAYLAND to draw windows, we can use xwininfo and xprop to get output from the currently drawn window. The values returned for _NET_FRAME_EXTENTS are incorrect when using any scaling factor (fractional and whole). The values returned should be the size of the window borders at the current scaling factor. For example, if the top border is 29pixels at 100%, then at 200% we would expect this value to be 58pixels from _NET_FRAME_EXTENTS. However the value reported is still 29pixels. STEPS TO REPRODUCE 1. spawn a window in xwayland with some scaling factor used (example of a YAD window spawned in the top left: ex: `GDK_BACKEND=x11 yad --geometry=200x200+0+0`) 2. check the winows output from xwininfo and note the "Absolute upper-left Y:" `xwininfo` 3. compare to the output from xprop `xprop _NET_FRAME_EXTENTS -id window_id_from_xwininfo` OBSERVED RESULT the observed result is that the output from xwininfo is correct with the "Absolute upper-left Y:" equaling the scaled window border size while the output from _NET_FRAME_EXTENTS is the window border size without any scaling. This is not the case on GNOME or native XORG with scaling EXPECTED RESULT the output from xwininfo and _NET_FRAME_EXTENTS match SOFTWARE/OS VERSIONS Linux/KDE Plasma: Ubuntu Lunar 5.27.4 (available in About System) KDE Plasma Version: 5.27.4 KDE Frameworks Version: 5.104.0 Qt Version: 5.15.8
It should go without saying this is only applicable when the "Legacy Applications (X11)" setting is set to "Apply scaling by themselves"
A possibly relevant merge request was started @ https://invent.kde.org/plasma/kwin/-/merge_requests/4214
Git commit d8029e461ee115ac339f3d7b2062f01ec9c46c40 by David Edmundson. Committed on 01/07/2023 at 11:48. Pushed by davidedmundson into branch 'master'. x11: Sync frame extents in X11 native pixels Frame extents are written out over the wire they should be in X11 native pixels. i.e if we are using 200% scaling, and have X11 clients scale themselves then from the point of view of the client reading the properties the window decorations are twice the size as normal. M +4 -4 src/x11window.cpp https://invent.kde.org/plasma/kwin/-/commit/d8029e461ee115ac339f3d7b2062f01ec9c46c40
Any chance this can be merged into the Plasma/5.27 branch of kwin?
Git commit 2131c9beed0efb723b51781af7095466bd6c806e by David Edmundson. Committed on 08/07/2023 at 10:33. Pushed by davidedmundson into branch 'Plasma/5.27'. x11: Sync frame extents in X11 native pixels Frame extents are written out over the wire they should be in X11 native pixels. i.e if we are using 200% scaling, and have X11 clients scale themselves then from the point of view of the client reading the properties the window decorations are twice the size as normal. (cherry picked from commit d8029e461ee115ac339f3d7b2062f01ec9c46c40) M +4 -4 src/x11window.cpp https://invent.kde.org/plasma/kwin/-/commit/2131c9beed0efb723b51781af7095466bd6c806e