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.
master
Brian Ashworth 6 years ago committed by emersion
parent 81e595e6e8
commit 247817f68c

@ -379,8 +379,10 @@ void handle_layer_shell_surface(struct wl_listener *listener, void *data) {
}
}
if (!output) {
if (!sway_assert(root->outputs->length,
"cannot auto-assign output for layer")) {
if (!root->outputs->length) {
wlr_log(WLR_ERROR,
"no output to auto-assign layer surface '%s' to",
layer_surface->namespace);
wlr_layer_surface_v1_close(layer_surface);
return;
}

Loading…
Cancel
Save