mirror of
https://github.com/swaywm/sway.git
synced 2024-11-22 07:51:28 +00:00
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.
This commit is contained in:
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…
Reference in a new issue