wl_window: fix buffer size not divisible by scale
Do not commit the surface with the new scale and the old buffer. Leave it to the next rendering pass to commit the surface. Fixes the following protocol error: wl_surface@10: error 2: Buffer size (717x795) is not divisible by scale (2) Closes: https://todo.sr.ht/~exec64/imv/20
This commit is contained in:
parent
4448fb6104
commit
1817ef3df1
|
@ -550,8 +550,6 @@ static void update_scale(struct imv_window *window)
|
|||
if (new_scale != window->scale) {
|
||||
window->scale = new_scale;
|
||||
wl_surface_set_buffer_scale(window->wl_surface, window->scale);
|
||||
wl_surface_commit(window->wl_surface);
|
||||
wl_display_roundtrip(window->wl_display);
|
||||
size_t buffer_width = window->width * window->scale;
|
||||
size_t buffer_height = window->height * window->scale;
|
||||
wl_egl_window_resize(window->egl_window, buffer_width, buffer_height, 0, 0);
|
||||
|
|
Loading…
Reference in a new issue