Xwayland modes get rounded from logical size
When calling xdg_output.set_logical_size the width of the output ends up rounded down to the nearest 8. The height of the mode is always the value passed in as is the screen width.
Steps to reproduce:
- Run
kwin_wayland --xwayland
and drag the window to be a random size, such as 473x400 - Query
xrandr -q
from within this. - Observed mode is incorrectly 472x400. The screen geometry says the right value
Having an output smaller than the window manager expects confuses some clients as they can be configured to be larger than the only available output. An example is thedarkmod
a linux native opengl game. Nothing gets rendered.
The more real-world case hitting our users is when fractional scaling is used. We end up with logical sizes that are not necessarily intervals of 8.
Downstream report: https://bugs.kde.org/show_bug.cgi?id=466454 (though note this report is potentially mixed with other bugs and therefore hard to follow)