diff options
author | Simon Ser <contact@emersion.fr> | 2020-12-08 16:15:03 +0100 |
---|---|---|
committer | Simon Ser <contact@emersion.fr> | 2020-12-08 16:15:48 +0100 |
commit | a1591c23d23c5db265d94f3ba442c57dc8eebd4b (patch) | |
tree | 8ac38195d4c128aed6409a6147f6143c1a39f348 /sway/server.c | |
parent | 5ad3990a6c9beae44392e1962223623c0a4e3fa9 (diff) |
Handle secondary headless backend failures
Diffstat (limited to 'sway/server.c')
-rw-r--r-- | sway/server.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/sway/server.c b/sway/server.c index cde8a5a2..ac30b6cf 100644 --- a/sway/server.c +++ b/sway/server.c @@ -173,7 +173,12 @@ bool server_init(struct sway_server *server) { server->headless_backend = wlr_headless_backend_create_with_renderer(server->wl_display, renderer); - wlr_multi_backend_add(server->backend, server->headless_backend); + if (!server->headless_backend) { + sway_log(SWAY_INFO, "Failed to create secondary headless backend, " + "starting without it"); + } else { + wlr_multi_backend_add(server->backend, server->headless_backend); + } // This may have been set already via -Dtxn-timeout if (!server->txn_timeout_ms) { |