From c11b5db4d6c1b9ce658405d92a23dd2993efca8e Mon Sep 17 00:00:00 2001 From: Kirill Primak Date: Fri, 24 Sep 2021 08:09:15 +0300 Subject: [PATCH] layer-shell: check `committed` bitmask This avoids infinite configure-ack_configure-commit loop. --- sway/desktop/layer_shell.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sway/desktop/layer_shell.c b/sway/desktop/layer_shell.c index 67369fb3..2b4b2027 100644 --- a/sway/desktop/layer_shell.c +++ b/sway/desktop/layer_shell.c @@ -297,6 +297,10 @@ static void handle_surface_commit(struct wl_listener *listener, void *data) { if (wlr_output == NULL) { return; } + if (layer_surface->current.committed == 0) { + // The layer surface state didn't change + return; + } struct sway_output *output = wlr_output->data; struct wlr_box old_extent = layer->extent;