From 10e060efcd0140643b337a398e610192e59ef622 Mon Sep 17 00:00:00 2001 From: Simon Zeni Date: Wed, 7 Dec 2022 13:39:00 -0500 Subject: [PATCH] sway/tree/container: check if container is scratchpad hidden first before getting siblings --- sway/tree/container.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sway/tree/container.c b/sway/tree/container.c index b86a99259..88e02023f 100644 --- a/sway/tree/container.c +++ b/sway/tree/container.c @@ -1404,15 +1404,15 @@ enum sway_container_layout container_current_parent_layout( } list_t *container_get_siblings(struct sway_container *container) { - if (container->pending.parent) { - return container->pending.parent->pending.children; - } - if (container_is_scratchpad_hidden(container)) { + if (container_is_scratchpad_hidden_or_child(container)) { return NULL; } if (!container->pending.workspace) { return NULL; } + if (container->pending.parent) { + return container->pending.parent->pending.children; + } if (list_find(container->pending.workspace->tiling, container) != -1) { return container->pending.workspace->tiling; }