diff --git a/river/XdgPopup.zig b/river/XdgPopup.zig index 95e504b..e08f7b0 100644 --- a/river/XdgPopup.zig +++ b/river/XdgPopup.zig @@ -96,6 +96,8 @@ pub fn destroy(xdg_popup: *XdgPopup) void { xdg_popup.new_popup.link.remove(); xdg_popup.new_subsurface.link.remove(); + if (xdg_popup.wlr_xdg_popup.base.mapped) xdg_popup.commit.link.remove(); + Subsurface.destroySubsurfaces(xdg_popup.wlr_xdg_popup.base.surface); XdgPopup.destroyPopups(xdg_popup.wlr_xdg_popup.base);