Skip to content

Commit

Permalink
wayland: set buffer scale before everything else
Browse files Browse the repository at this point in the history
  • Loading branch information
Cloudef committed Feb 2, 2024
1 parent 943d746 commit 80d904c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/renderers/wayland/window.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 80d904c

Please sign in to comment.