From bcc0587ab96bcbc6f23d6267b698b3716e415ed7 Mon Sep 17 00:00:00 2001 From: Nicolas Guichard Date: Fri, 7 Mar 2025 17:49:35 +0100 Subject: [PATCH] xwayland: Fix minimum wl_compositor protocol version Commit 54f8fc409091ea3b3466cbf948a53194aaa26aad introduced the use of wl_surface::set_buffer_scale, which is only available starting with version 3 of the wl_compositor protocol. Because we already prefer version 4 when available, this went unnoticed but broke versions 1, 2 and 3 when reaching the wl_surface::set_buffer_scale call. This restores functionality for version 3 and properly document that versions 1 and 2 are not supported anymore. Signed-off-by: Nicolas Guichard Part-of: --- hw/xwayland/xwayland-screen.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/xwayland/xwayland-screen.c b/hw/xwayland/xwayland-screen.c index 89d758b04..59554b734 100644 --- a/hw/xwayland/xwayland-screen.c +++ b/hw/xwayland/xwayland-screen.c @@ -495,7 +495,7 @@ registry_global(void *data, struct wl_registry *registry, uint32_t id, struct xwl_screen *xwl_screen = data; if (strcmp(interface, wl_compositor_interface.name) == 0) { - uint32_t request_version = 1; + uint32_t request_version = WL_SURFACE_SET_BUFFER_SCALE_SINCE_VERSION; if (version >= WL_SURFACE_DAMAGE_BUFFER_SINCE_VERSION) request_version = WL_SURFACE_DAMAGE_BUFFER_SINCE_VERSION;