aboutsummaryrefslogtreecommitdiffstats
path: root/sway/desktop/layer_shell.c
diff options
context:
space:
mode:
authorLibravatar Brian Ashworth <bosrsf04@gmail.com>2019-01-16 00:44:24 -0500
committerLibravatar emersion <contact@emersion.fr>2019-01-16 10:55:25 +0100
commit247817f68c69c8f4533d948502ae300520dcad59 (patch)
tree89a5e03ad5e196bd4907d670e99180b7ff3c609a /sway/desktop/layer_shell.c
parentcmd_resize: allow resizing hidden scratchpad by px (diff)
downloadsway-247817f68c69c8f4533d948502ae300520dcad59.tar.gz
sway-247817f68c69c8f4533d948502ae300520dcad59.tar.zst
sway-247817f68c69c8f4533d948502ae300520dcad59.zip
layer_shell: do not SIGABRT sway on zero outputs
If there are no outputs, do not SIGABRT when a layer surface is created, just close the layer surface.
Diffstat (limited to 'sway/desktop/layer_shell.c')
-rw-r--r--sway/desktop/layer_shell.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/sway/desktop/layer_shell.c b/sway/desktop/layer_shell.c
index cabb07f5..ab05778d 100644
--- a/sway/desktop/layer_shell.c
+++ b/sway/desktop/layer_shell.c
@@ -379,8 +379,10 @@ void handle_layer_shell_surface(struct wl_listener *listener, void *data) {
379 } 379 }
380 } 380 }
381 if (!output) { 381 if (!output) {
382 if (!sway_assert(root->outputs->length, 382 if (!root->outputs->length) {
383 "cannot auto-assign output for layer")) { 383 wlr_log(WLR_ERROR,
384 "no output to auto-assign layer surface '%s' to",
385 layer_surface->namespace);
384 wlr_layer_surface_v1_close(layer_surface); 386 wlr_layer_surface_v1_close(layer_surface);
385 return; 387 return;
386 } 388 }