cage: fix abort on shutdown

Workaround for [1]: register a listener for wl_display destroy and
avoid calling wl_display_terminate() after.

[1]: https://gitlab.freedesktop.org/wayland/wayland/-/merge_requests/421
This commit is contained in:
Simon Ser 2024-08-28 15:05:03 +02:00
parent 1abf7e5a4b
commit 412c11ea91
4 changed files with 32 additions and 9 deletions

View file

@ -25,6 +25,7 @@ struct cg_server {
struct wlr_renderer *renderer;
struct wlr_allocator *allocator;
struct wlr_session *session;
struct wl_listener display_destroy;
struct cg_seat *seat;
struct wlr_idle_notifier_v1 *idle;
@ -61,6 +62,9 @@ struct cg_server {
bool xdg_decoration;
bool allow_vt_switch;
bool return_app_code;
bool terminated;
};
void server_terminate(struct cg_server *server);
#endif