mirror of
https://github.com/NickHu/sway
synced 2024-12-27 21:58:11 +01: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
1 changed files with 4 additions and 2 deletions
|
@ -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