From ae980e66e9aa0e2adb27f672b35a70994ea77c48 Mon Sep 17 00:00:00 2001 From: Ollie Date: Sat, 30 May 2026 11:41:48 +0200 Subject: [PATCH] fix: resize wireframe animation on Wayland (overlay flush per draw) The overlay drawing functions (wl_overlay_draw_rect, wl_overlay_draw_line) write XOR pixels to a client-side pixman buffer but never flushed it to the scene graph. On X11, each XDrawRectangle is immediately processed server-side, so the wireframe appears in real-time. On Wayland, the overlay buffer was only flushed in wl_server_ungrab() at the END of the resize operation. Added overlay_flush() after each draw call so each XOR batch is pushed to wlr_scene_buf and rendered immediately. --- src/backend/wayland/wl_backend.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/backend/wayland/wl_backend.c b/src/backend/wayland/wl_backend.c index de335fd..e7b80e1 100644 --- a/src/backend/wayland/wl_backend.c +++ b/src/backend/wayland/wl_backend.c @@ -7579,8 +7579,10 @@ static void wl_overlay_draw_line(WScreen *scr, int x1, int y1, int x2, int y2) { overlay_ensure(scr); - if (wl_state.overlay_surf) + if (wl_state.overlay_surf) { ovl_line(wl_state.overlay_surf, x1, y1, x2, y2); + overlay_flush(); + } } static void @@ -7605,6 +7607,7 @@ wl_overlay_draw_rect(WScreen *scr, int x, int y, int w, int h) ovl_hline(s, x, y + h, w + 1); /* bottom */ ovl_vline(s, x, y, h + 1); /* left */ ovl_vline(s, x + w, y, h + 1); /* right */ + overlay_flush(); } static void