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: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1739>
This commit is contained in:
Michel Dänzer 2024-10-31 18:15:42 +01:00 committed by Marge Bot
parent 375c35a5e4
commit 8c4b137237

View File

@ -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);