decoration: remove listeners on destroy

This commit is contained in:
Isaac Freund 2021-06-14 22:55:10 +00:00
parent 9ecffe21d8
commit f3024d9198
No known key found for this signature in database
GPG key ID: 86DED400DDFD7A11

View file

@ -47,6 +47,8 @@ fn handleDestroy(
xdg_toplevel_decoration: *wlr.XdgToplevelDecorationV1, xdg_toplevel_decoration: *wlr.XdgToplevelDecorationV1,
) void { ) void {
const self = @fieldParentPtr(Self, "destroy", listener); const self = @fieldParentPtr(Self, "destroy", listener);
self.destroy.link.remove();
self.request_mode.link.remove();
util.gpa.destroy(self); util.gpa.destroy(self);
} }