From 80d904c534d3ddacce0936471271f928ab194dd9 Mon Sep 17 00:00:00 2001 From: Jari Vetoniemi Date: Fri, 2 Feb 2024 14:56:12 +0900 Subject: [PATCH] wayland: set buffer scale before everything else --- lib/renderers/wayland/window.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/renderers/wayland/window.c b/lib/renderers/wayland/window.c index 61cd274..23d05a5 100644 --- a/lib/renderers/wayland/window.c +++ b/lib/renderers/wayland/window.c @@ -260,9 +260,11 @@ bm_wl_window_render(struct window *window, struct wl_display *display, struct bm destroy_buffer(buffer); } + assert(window->width * buffer->cairo.scale == buffer->width); + assert(window->height * buffer->cairo.scale == buffer->height); + wl_surface_set_buffer_scale(window->surface, buffer->cairo.scale); wl_surface_damage_buffer(window->surface, 0, 0, buffer->width, buffer->height); wl_surface_attach(window->surface, buffer->buffer, 0, 0); - wl_surface_set_buffer_scale(window->surface, window->scale); wl_surface_commit(window->surface); buffer->busy = true; window->render_pending = false;