From 1c7ed16d0503f96e4011717e8758f0cb4f404de5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michel=20D=C3=A4nzer?= Date: Tue, 7 May 2024 17:54:25 +0200 Subject: [PATCH] Revert "wayland/surface: Check buffer size also for role-less surfaces" This reverts commit 98c8c03729fd3fe72980d55fc3dccd8a0e9702e9. Although the spec technically doesn't allow this for role-less surfaces either, it's difficult for clients to avoid it for surfaces which later assume a cursor role, and there's consensus to allow it for the time being: https://gitlab.freedesktop.org/wayland/wayland/-/issues/194#note_1371674 Closes: https://gitlab.gnome.org/GNOME/mutter/-/issues/3471 Part-of: --- src/wayland/meta-wayland-surface.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wayland/meta-wayland-surface.c b/src/wayland/meta-wayland-surface.c index b433a5b1b..dd306835c 100644 --- a/src/wayland/meta-wayland-surface.c +++ b/src/wayland/meta-wayland-surface.c @@ -981,7 +981,7 @@ meta_wayland_surface_commit (MetaWaylandSurface *surface) if ((meta_multi_texture_get_width (committed_texture) % committed_scale != 0) || (meta_multi_texture_get_height (committed_texture) % committed_scale != 0)) { - if (!surface->role || !META_IS_WAYLAND_CURSOR_SURFACE (surface->role)) + if (surface->role && !META_IS_WAYLAND_CURSOR_SURFACE (surface->role)) { wl_resource_post_error (surface->resource, WL_SURFACE_ERROR_INVALID_SIZE, "Buffer size (%dx%d) must be an integer multiple "