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
---
src/wl_window.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/src/wl_window.c b/src/wl_window.c
index 5efa42f7d062..0c2221a9b9be 100644
--- a/src/wl_window.c
+++ b/src/wl_window.c
@@ -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);
base-commit: 4448fb6104d67e3dfff3e71babe257992fce5560
--
2.39.0