mirror of
https://github.com/swaywm/sway.git
synced 2025-04-03 02:47:46 +03:00
server: remove event listeners on fini
This fixes a crash in wlroots listener checks. See #8509.
This commit is contained in:
parent
a25645a5a6
commit
efd8a4a0f7
1 changed files with 21 additions and 0 deletions
|
@ -460,8 +460,29 @@ bool server_init(struct sway_server *server) {
|
|||
}
|
||||
|
||||
void server_fini(struct sway_server *server) {
|
||||
// remove listeners
|
||||
wl_list_remove(&server->renderer_lost.link);
|
||||
wl_list_remove(&server->new_output.link);
|
||||
wl_list_remove(&server->layer_shell_surface.link);
|
||||
wl_list_remove(&server->xdg_shell_toplevel.link);
|
||||
wl_list_remove(&server->server_decoration.link);
|
||||
wl_list_remove(&server->xdg_decoration.link);
|
||||
wl_list_remove(&server->pointer_constraint.link);
|
||||
wl_list_remove(&server->output_manager_apply.link);
|
||||
wl_list_remove(&server->output_manager_test.link);
|
||||
wl_list_remove(&server->output_power_manager_set_mode.link);
|
||||
#if WLR_HAS_DRM_BACKEND
|
||||
wl_list_remove(&server->drm_lease_request.link);
|
||||
#endif
|
||||
wl_list_remove(&server->tearing_control_new_object.link);
|
||||
wl_list_remove(&server->xdg_activation_v1_request_activate.link);
|
||||
wl_list_remove(&server->xdg_activation_v1_new_token.link);
|
||||
wl_list_remove(&server->request_set_cursor_shape.link);
|
||||
|
||||
// TODO: free sway-specific resources
|
||||
#if WLR_HAS_XWAYLAND
|
||||
wl_list_remove(&server->xwayland_surface.link);
|
||||
wl_list_remove(&server->xwayland_ready.link);
|
||||
wlr_xwayland_destroy(server->xwayland.wlr_xwayland);
|
||||
#endif
|
||||
wl_display_destroy_clients(server->wl_display);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue