Assert (almost all) signals have no attached listeners on destroy

This commit is contained in:
Kirill Primak 2024-11-22 20:32:32 +03:00
parent b03b05d2b3
commit 8f56f7ca43
79 changed files with 518 additions and 9 deletions

View file

@ -178,6 +178,7 @@ struct wlr_xwayland_shell_v1 *wlr_xwayland_shell_v1_create(
}
wl_list_init(&shell->surfaces);
wl_signal_init(&shell->events.new_surface);
wl_signal_init(&shell->events.destroy);
@ -196,6 +197,9 @@ void wlr_xwayland_shell_v1_destroy(struct wlr_xwayland_shell_v1 *shell) {
wl_signal_emit_mutable(&shell->events.destroy, NULL);
assert(wl_list_empty(&shell->events.new_surface.listener_list));
assert(wl_list_empty(&shell->events.destroy.listener_list));
struct wlr_xwayland_surface_v1 *xwl_surface, *tmp;
wl_list_for_each_safe(xwl_surface, tmp, &shell->surfaces, link) {
xwl_surface_destroy(xwl_surface);