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.

(cherry picked from commit 8154d80a4d)
This commit is contained in:
Simon Ser 2026-05-22 20:05:17 +02:00 committed by Simon Zeni
parent 90920192d3
commit 94e62783a1

View file

@ -1466,6 +1466,11 @@ static void xwm_handle_surface_id_message(struct wlr_xwm *xwm,
ev->window);
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];