WClient use wl_client_add_destroy_listener, but wlroots's xdg shell using wl_resource_set_implementation to handle the wl_client destroy, xdg shell will handle wl_client destroy after WClient destroy, lead to xdg surfaces destroy after WClient, can't get a valid WClient for xdg surface destroy handler on compositor.
Should ensure the WClient destroy after all surfaces of the client.