From 8c4b137237498f9f67e0e44e650edcb39851c870 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michel=20D=C3=A4nzer?= Date: Thu, 31 Oct 2024 18:15:42 +0100 Subject: [PATCH] xwayland: Always decrement expecting_event in xwl_output_create If we bail without decrementing it, xwl_screen_init will keep waiting indefinitely for an event which never arrives. Part-of: --- hw/xwayland/xwayland-output.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hw/xwayland/xwayland-output.c b/hw/xwayland/xwayland-output.c index 7300af48a..dd0d71690 100644 --- a/hw/xwayland/xwayland-output.c +++ b/hw/xwayland/xwayland-output.c @@ -910,6 +910,8 @@ xwl_output_create(struct xwl_screen *xwl_screen, uint32_t id, struct xwl_output *xwl_output; char name[MAX_OUTPUT_NAME] = { 0 }; + --xwl_screen->expecting_event; + xwl_output = calloc(1, sizeof *xwl_output); if (xwl_output == NULL) { ErrorF("%s ENOMEM\n", __func__); @@ -958,7 +960,6 @@ xwl_output_create(struct xwl_screen *xwl_screen, uint32_t id, * use it when binding to the xdg-output protocol... */ xorg_list_append(&xwl_output->link, &xwl_screen->output_list); - --xwl_screen->expecting_event; if (xwl_screen->xdg_output_manager) xwl_output_get_xdg_output(xwl_output);