From 2c69e19fd30c5ceac61d6af821c6c6875cd3f8b6 Mon Sep 17 00:00:00 2001 From: Kirill Primak Date: Wed, 17 Jan 2024 18:51:21 +0300 Subject: layer-shell: don't configure uninitialized surfaces --- sway/desktop/layer_shell.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/sway/desktop/layer_shell.c b/sway/desktop/layer_shell.c index d493fb39..e5e7046a 100644 --- a/sway/desktop/layer_shell.c +++ b/sway/desktop/layer_shell.c @@ -131,6 +131,9 @@ static void arrange_layer(struct sway_output *output, struct wl_list *list, &full_area.width, &full_area.height); wl_list_for_each(sway_layer, list, link) { struct wlr_layer_surface_v1 *layer = sway_layer->layer_surface; + if (!layer->initialized) { + return; + } struct wlr_layer_surface_v1_state *state = &layer->current; if (exclusive != (state->exclusive_zone > 0)) { continue; @@ -327,6 +330,8 @@ static void handle_surface_commit(struct wl_listener *listener, void *data) { if (layer_surface->initial_commit) { surface_enter_output(layer_surface->surface, output); + } else if (!layer_surface->initialized) { + return; } struct wlr_box old_extent = layer->extent; -- cgit v1.2.3-70-g09d2