Xwayland failing to set viewport and _XWAYLAND_RANDR_EMU_MONITOR_RECTS
Hi, I am trying to find a solution to mutter not being able to scale 640x480 wine games with xwayland properly. I am on mantic, with fairly latest packages, but for sure not the absolute latest xwayland release. Although, this is what gnome mutter devs where able to find out. They basically claim that xwayland seems the culprit here.
Link to the issue: https://gitlab.gnome.org/GNOME/mutter/-/issues/3131
What the dev said there:
Sebastian Keller @skeller
The way this is supposed to work is that XWayland detects when an X11 application tries to change the resolution of the monitor and then sets up a Wayland viewport that scales the window accordingly. This does not seem to happen for those applications.
Running env WINEDEBUG=+x11drv wine ./CLAW.EXE 2>&1 | grep apply_display_settings gives:
0114:trace:x11drv:apply_display_settings handler:XRandR 1.4 changing L"\\.\DISPLAY1" to position:(0,0) resolution:640x480 frequency:59Hz depth:8bits orientation:0.
So wine attempts to change the resolution, but XWayland does not set up a viewport. It does not set the _XWAYLAND_RANDR_EMU_MONITOR_RECTS property on the window either. That might mean that some of the heuristics used to detect these fullscreen + resolution changes are no longer working, possibly due to changes on the mutter side (maybe the frames client). Now it would be good to know if this is an issue on the XWayland side or on the mutter side. Does this work on other Wayland compositors?