diff options
author | Simon Ser <contact@emersion.fr> | 2022-12-22 15:44:15 +0100 |
---|---|---|
committer | Simon Ser <contact@emersion.fr> | 2022-12-22 15:44:15 +0100 |
commit | 445ce7eac63793130fa51f0f5d1811884fa8b579 (patch) | |
tree | 4d08c178275a46d160ca85e1961fd0bf0d4ae7fe | |
parent | a922428c41dedea2c27f614963e7876926bba7fb (diff) |
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.
-rw-r--r-- | xwayland/xwm.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/xwayland/xwm.c b/xwayland/xwm.c index 917aaaff..c39f640f 100644 --- a/xwayland/xwm.c +++ b/xwayland/xwm.c @@ -885,6 +885,8 @@ static const struct wlr_addon_interface surface_addon_impl = { static void xwayland_surface_associate(struct wlr_xwm *xwm, struct wlr_xwayland_surface *xsurface, struct wlr_surface *surface) { + assert(xsurface->surface == NULL); + wl_list_remove(&xsurface->unpaired_link); wl_list_init(&xsurface->unpaired_link); xsurface->surface_id = 0; |