From 27d2eb8596461db89685f42c25ec7c7f02a3435f Mon Sep 17 00:00:00 2001 From: Kirill Primak Date: Tue, 18 Jun 2024 18:31:34 +0300 Subject: [PATCH] backend/wayland: dispatch remote display when waiting for a configure event We don't need to process all events, only those that come from the host compositor. This also avoids running user event handlers while in the middle of committing an output. Fixes: https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/3857 --- backend/wayland/output.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/wayland/output.c b/backend/wayland/output.c index d370e200..3a6b2bd4 100644 --- a/backend/wayland/output.c +++ b/backend/wayland/output.c @@ -585,8 +585,8 @@ static bool output_commit(struct wlr_output *wlr_output, wl_display_flush(output->backend->remote_display); while (!output->configured) { - if (wl_event_loop_dispatch(output->backend->event_loop, -1) == -1) { - wlr_log(WLR_ERROR, "wl_event_loop_dispatch() failed"); + if (wl_display_dispatch(output->backend->remote_display) == -1) { + wlr_log(WLR_ERROR, "wl_display_dispatch() failed"); return false; } }