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
master
Kirill Primak 5 months ago
parent cedcd3252a
commit 27d2eb8596

@ -585,8 +585,8 @@ static bool output_commit(struct wlr_output *wlr_output,
wl_display_flush(output->backend->remote_display); wl_display_flush(output->backend->remote_display);
while (!output->configured) { while (!output->configured) {
if (wl_event_loop_dispatch(output->backend->event_loop, -1) == -1) { if (wl_display_dispatch(output->backend->remote_display) == -1) {
wlr_log(WLR_ERROR, "wl_event_loop_dispatch() failed"); wlr_log(WLR_ERROR, "wl_display_dispatch() failed");
return false; return false;
} }
} }

Loading…
Cancel
Save