xwayland/xwm: check whether surface is already associated for WL_SURFACE_ID

xwayland_surface_associate() asserts that the surface has not yet
been associated yet. Arbitrary clients can send these messages,
don't abort when that happens.
This commit is contained in:
Simon Ser 2026-05-22 20:05:17 +02:00
parent 041aa8c048
commit 8154d80a4d

View file

@ -1466,6 +1466,11 @@ static void xwm_handle_surface_id_message(struct wlr_xwm *xwm,
ev->window); ev->window);
return; return;
} }
if (xsurface->surface != NULL) {
wlr_log(WLR_DEBUG, "Received multiple client messages WL_SURFACE_ID "
"for an already-associated X11 window %u", ev->window);
return;
}
uint32_t id = ev->data.data32[0]; uint32_t id = ev->data.data32[0];