diff options
Diffstat (limited to 'sway/tree/layout.c')
-rw-r--r-- | sway/tree/layout.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sway/tree/layout.c b/sway/tree/layout.c index 32e6a77c..588ceb2d 100644 --- a/sway/tree/layout.c +++ b/sway/tree/layout.c | |||
@@ -110,9 +110,11 @@ struct sway_container *container_reap_empty(struct sway_container *container) { | |||
110 | while (container->children->length == 0) { | 110 | while (container->children->length == 0) { |
111 | if (container->type == C_WORKSPACE) { | 111 | if (container->type == C_WORKSPACE) { |
112 | if (!workspace_is_visible(container)) { | 112 | if (!workspace_is_visible(container)) { |
113 | struct sway_container *parent = container->parent; | ||
113 | container_workspace_destroy(container); | 114 | container_workspace_destroy(container); |
115 | return parent; | ||
114 | } | 116 | } |
115 | break; | 117 | return container; |
116 | } else if (container->type == C_CONTAINER) { | 118 | } else if (container->type == C_CONTAINER) { |
117 | struct sway_container *parent = container->parent; | 119 | struct sway_container *parent = container->parent; |
118 | container_destroy(container); | 120 | container_destroy(container); |