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:
parent
20ca8a2051
commit
b716e262cd
@ -96,6 +96,8 @@ pub fn destroy(xdg_popup: *XdgPopup) void {
|
|||||||
xdg_popup.new_popup.link.remove();
|
xdg_popup.new_popup.link.remove();
|
||||||
xdg_popup.new_subsurface.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);
|
Subsurface.destroySubsurfaces(xdg_popup.wlr_xdg_popup.base.surface);
|
||||||
XdgPopup.destroyPopups(xdg_popup.wlr_xdg_popup.base);
|
XdgPopup.destroyPopups(xdg_popup.wlr_xdg_popup.base);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user