Signal Client Destroy After All Resources Are Auto Cleaned Up
wl_client_add_destroy_listener adds a listener to the client destruction. But this signal is emitted before libwayland cleans up all resources of the client.
From a hierarchical perspective it makes more sense for consumers of libwayland to handle such resource destruction with the client still around and only afterwards also clean up the client internally.
Otherwise consumers have to actively listen for client destroy and internally clean up cross-references between resources on that signal emittion like here.
This issue was briefly also already discussed in #103 (comment 701873).
- A solution to the issue with guaranteed backwards compatibility could be the introduction of a separate signal, which is sent after all resources have been cleaned up. Consumers then need to explicitly add a listener for that signal instead of the old destroy signal.