From 6efb3b50421d9adc8d1220ccae63af45d423f5cf Mon Sep 17 00:00:00 2001 From: Simon Ser Date: Thu, 10 Apr 2025 18:09:01 +0200 Subject: [PATCH] cage: remove global server listeners on shutdown --- cage.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/cage.c b/cage.c index 8f14746..40a675d 100644 --- a/cage.c +++ b/cage.c @@ -596,11 +596,25 @@ main(int argc, char *argv[]) wl_display_run(server.wl_display); #if CAGE_HAS_XWAYLAND + if (xwayland) { + wl_list_remove(&server.new_xwayland_surface.link); + } wlr_xwayland_destroy(xwayland); wlr_xcursor_manager_destroy(xcursor_manager); #endif wl_display_destroy_clients(server.wl_display); + wl_list_remove(&server.new_virtual_pointer.link); + wl_list_remove(&server.new_virtual_keyboard.link); + wl_list_remove(&server.output_manager_apply.link); + wl_list_remove(&server.output_manager_test.link); + wl_list_remove(&server.xdg_toplevel_decoration.link); + wl_list_remove(&server.new_xdg_toplevel.link); + wl_list_remove(&server.new_xdg_popup.link); + wl_list_remove(&server.new_idle_inhibitor_v1.link); + wl_list_remove(&server.new_output.link); + wl_list_remove(&server.output_layout_change.link); + end: if (pid != 0) app_ret = cleanup_primary_client(pid);