From 628e667d4bafcd41561989bae2bb6efd3c349e67 Mon Sep 17 00:00:00 2001 From: Consolatis <35009135+Consolatis@users.noreply.github.com> Date: Mon, 2 Mar 2026 08:58:31 +0100 Subject: [PATCH] layers.c: allow layer surfaces on disabled outputs 4f8b80700ea43546ffe116157820425009d04ccf added a check for the output being enabled when creating a layershell surface with automatic output selection. This causes labwc to send a `layer_surface.close()` and `wl_surface.destroy()` to layershell clients when creating a new layershell surface on a disabled output which is still part of the layout (e.g. `wlopm --off`). This MR replaces the `output_is_usable()` check with a dedicated check, bypassing the check for the output being enabled. Fixes: #3410 Reported-By: coruja --- src/layers.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/layers.c b/src/layers.c index f7771b0a..60421e39 100644 --- a/src/layers.c +++ b/src/layers.c @@ -687,7 +687,14 @@ handle_new_layer_surface(struct wl_listener *listener, void *data) if (!layer_surface->output) { struct output *output = output_nearest_to_cursor(server); - if (!output_is_usable(output)) { + if (!output || !output->scene_output) { + /* + * We are not using output_is_usable() here because + * it also checks if the output is enabled which is + * not the case when wlopm is used. Thus we allow + * layer surfaces to spawn on disabled outputs as + * long as it is part of the scene layout. + */ wlr_log(WLR_INFO, "No output available to assign layer surface"); wlr_layer_surface_v1_destroy(layer_surface);