xwayland/xwm: assert that we're not overwriting when associating

Make sure xwayland_surface_associate() is not called twice in a
row without a xwayland_surface_dissociate() call in-between.
Simon Ser 2 years ago
parent a922428c41
commit 445ce7eac6

@ -885,6 +885,8 @@ static const struct wlr_addon_interface surface_addon_impl = {
static void xwayland_surface_associate(struct wlr_xwm *xwm, static void xwayland_surface_associate(struct wlr_xwm *xwm,
struct wlr_xwayland_surface *xsurface, struct wlr_surface *surface) { struct wlr_xwayland_surface *xsurface, struct wlr_surface *surface) {
assert(xsurface->surface == NULL);
wl_list_remove(&xsurface->unpaired_link); wl_list_remove(&xsurface->unpaired_link);
wl_list_init(&xsurface->unpaired_link); wl_list_init(&xsurface->unpaired_link);
xsurface->surface_id = 0; xsurface->surface_id = 0;

Loading…
Cancel
Save