Remove decoration event listeners on destroynotify

When destroynotify doesn't clean up these listeners it causes a crash once the cleanup of the decoration is triggered

Thanks to kennylevinsen - https://codeberg.org/dwl/dwl/issues/1205#issuecomment-22424401
This commit is contained in:
Alex Denes
2026-09-06 13:52:31 +00:00
parent f4dfdabd0b
commit 04279f28e0
+4
View File
@@ -1348,6 +1348,10 @@ destroynotify(struct wl_listener *listener, void *data)
wl_list_remove(&c->map.link); wl_list_remove(&c->map.link);
wl_list_remove(&c->unmap.link); wl_list_remove(&c->unmap.link);
wl_list_remove(&c->maximize.link); wl_list_remove(&c->maximize.link);
if (c->decoration) {
wl_list_remove(&c->set_decoration_mode.link);
wl_list_remove(&c->destroy_decoration.link);
}
} }
free(c); free(c);
} }