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

@ -1053,9 +1053,26 @@ int main(int argc, char *argv[]) {
socket);
wl_display_run(server.wl_display);
/* Once wl_display_run returns, we destroy all clients then shut down the
* server. */
wl_display_destroy_clients(server.wl_display);
wl_list_remove(&server.new_xdg_toplevel.link);
wl_list_remove(&server.new_xdg_popup.link);
wl_list_remove(&server.cursor_motion.link);
wl_list_remove(&server.cursor_motion_absolute.link);
wl_list_remove(&server.cursor_button.link);
wl_list_remove(&server.cursor_axis.link);
wl_list_remove(&server.cursor_frame.link);
wl_list_remove(&server.new_input.link);
wl_list_remove(&server.request_cursor.link);
wl_list_remove(&server.request_set_selection.link);
wl_list_remove(&server.new_output.link);
wlr_scene_node_destroy(&server.scene->tree.node);
wlr_xcursor_manager_destroy(server.cursor_mgr);
wlr_cursor_destroy(server.cursor);