From 17640d9c98eb9a2bce019a4bf4092e6ddf8b0544 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michel=20D=C3=A4nzer?= Date: Tue, 19 Dec 2023 11:23:22 +0100 Subject: [PATCH] wayland/surface: Use committed texture width/height in _surface_commit meta_wayland_surface_get_buffer_width/height uses the currently applied buffer, which may have a different size. Fixes: 7649e2f3abd5 ("wayland/surface: Move buffer size check to meta_wayland_surface_commit") Part-of: --- src/wayland/meta-wayland-surface.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/wayland/meta-wayland-surface.c b/src/wayland/meta-wayland-surface.c index ef06f5da4..b6126c4a2 100644 --- a/src/wayland/meta-wayland-surface.c +++ b/src/wayland/meta-wayland-surface.c @@ -927,8 +927,8 @@ meta_wayland_surface_commit (MetaWaylandSurface *surface) wl_resource_post_error (surface->resource, WL_SURFACE_ERROR_INVALID_SIZE, "Buffer size (%dx%d) must be an integer multiple " "of the buffer_scale (%d).", - meta_wayland_surface_get_buffer_width (surface), - meta_wayland_surface_get_buffer_height (surface), + meta_multi_texture_get_width (committed_texture), + meta_multi_texture_get_height (committed_texture), committed_scale); return; } @@ -943,8 +943,8 @@ meta_wayland_surface_commit (MetaWaylandSurface *surface) g_warning ("Bug in client with pid %ld: Cursor buffer size (%dx%d) is " "not an integer multiple of the buffer_scale (%d).", (long) pid, - meta_wayland_surface_get_buffer_width (surface), - meta_wayland_surface_get_buffer_height (surface), + meta_multi_texture_get_width (committed_texture), + meta_multi_texture_get_height (committed_texture), committed_scale); } }