XdgPopup: remove commit listener on destroy if mapped
Since the destroy() function may be called by river while the popup is mapped, we must handle this case.
This commit is contained in:
@ -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);
|
||||
|
||||
|
Reference in New Issue
Block a user