From 041aa8c0488a4bcfab220aaa841e926a5639d788 Mon Sep 17 00:00:00 2001 From: Simon Ser Date: Fri, 22 May 2026 19:51:11 +0200 Subject: [PATCH] xwayland/xwm: expand comment about WL_SURFACE_ID event ordering Make it clearer what's up. --- xwayland/xwm.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/xwayland/xwm.c b/xwayland/xwm.c index edf85cf3a..a5489b464 100644 --- a/xwayland/xwm.c +++ b/xwayland/xwm.c @@ -1466,8 +1466,12 @@ static void xwm_handle_surface_id_message(struct wlr_xwm *xwm, ev->window); return; } - /* Check if we got notified after wayland surface create event */ + uint32_t id = ev->data.data32[0]; + + // Because the X11 and Wayland connections are separate sockets, the + // WL_SURFACE_ID and wl_compositor.create_surface messages may be received + // in any order. struct wl_resource *resource = wl_client_get_object(xwm->xwayland->server->client, id); if (resource) {