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

@ -240,7 +240,7 @@ output_destroy(struct cg_output *output)
free(output);
if (wl_list_empty(&server->outputs) && was_nested_output) {
wl_display_terminate(server->wl_display);
server_terminate(server);
} else if (server->output_mode == CAGE_MULTI_OUTPUT_MODE_LAST && !wl_list_empty(&server->outputs)) {
struct cg_output *prev = wl_container_of(server->outputs.next, prev, link);
output_enable(prev);