From ee434b024ae81a01deb94da080d490afff80080f Mon Sep 17 00:00:00 2001 From: Window Maker Date: Mon, 25 May 2026 12:43:55 +0200 Subject: [PATCH] wayland: commit scene after dispatch to fix one-frame-behind rendering Client surface commits arrive during wl_event_loop_dispatch but may be processed after the frame event has already rendered the old state. Add an additional wlr_scene_output_commit after dispatch to immediately pick up any new client content, fixing the one-interaction-behind visual update issue in WINGs clients like WPrefs. --- src/backend/wayland/wl_backend.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/backend/wayland/wl_backend.c b/src/backend/wayland/wl_backend.c index 4d4dc3c..ed5c96f 100644 --- a/src/backend/wayland/wl_backend.c +++ b/src/backend/wayland/wl_backend.c @@ -3679,6 +3679,11 @@ wl_event_loop_run(void) wlr_output_schedule_frame(wl_state.output); wl_event_loop_dispatch(loop, 16); + /* Commit scene after dispatch to pick up any client surface + * updates that arrived during this iteration. */ + if (wl_state.scene_output && wl_state.allocator) + wlr_scene_output_commit(wl_state.scene_output, NULL); + /* Check inotify for defaults database changes */ #ifdef HAVE_INOTIFY if (w_global.inotify.fd_event_queue >= 0) {