summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sway/tree/container.c14
1 files changed, 3 insertions, 11 deletions
diff --git a/sway/tree/container.c b/sway/tree/container.c
index 7f55ad90..57dcb4bd 100644
--- a/sway/tree/container.c
+++ b/sway/tree/container.c
@@ -294,18 +294,10 @@ struct sway_container *container_close(struct sway_container *con) {
294 294
295 struct sway_container *parent = con->parent; 295 struct sway_container *parent = con->parent;
296 296
297 switch (con->type) { 297 if (con->type == C_VIEW) {
298 case C_TYPES:
299 case C_ROOT:
300 case C_OUTPUT:
301 case C_WORKSPACE:
302 case C_CONTAINER:
303 container_for_each_descendant_dfs(con, container_close_func, NULL);
304 break;
305 case C_VIEW:
306 view_close(con->sway_view); 298 view_close(con->sway_view);
307 break; 299 } else {
308 300 container_for_each_descendant_dfs(con, container_close_func, NULL);
309 } 301 }
310 302
311 return parent; 303 return parent;