xwayland: Add -force-xrandr-emulation switch

Graphics / X.Org / X.Org Server - Joshua Ashton [froggi.es] - 18 May 2022 13:04 UTC

Adds a -force-xrandr-emulation cmdline switch that always exposes extra modes when viewporter isn't exposed by the Wayland compositor.

Having the additional modes exposed by the X server is important for games to function and be configured

Compositors, such as Gamescope (the compositor for Steam Deck), support only a single window that is rendered in the centre of the screen that is scaled up to fill the screen by the compositor based on some user scaling settings.

Exposing viewporter, wouldn't make sense here, and could mislead native Wayland clients, so exposing dummy modesets in X is preferred here.

7cdcdfea0 xwayland: Add -force-xrandr-emulation switch
hw/xwayland/man/Xwayland.man | 4 ++++
hw/xwayland/xwayland-output.c | 2 +-
hw/xwayland/xwayland-screen.c | 3 +++
hw/xwayland/xwayland-screen.h | 1 +
hw/xwayland/xwayland.c | 1 +
hw/xwayland/xwayland.pc.in | 1 +
6 files changed, 11 insertions(+), 1 deletion(-)

Upstream: cgit.freedesktop.org

  • Share