mirror of
https://github.com/swaywm/sway.git
synced 2024-11-12 05:24:11 +01:00
simplify container close
This commit is contained in:
parent
fa004dd0d7
commit
9d1cbd77ac
@ -294,18 +294,10 @@ struct sway_container *container_close(struct sway_container *con) {
|
|||||||
|
|
||||||
struct sway_container *parent = con->parent;
|
struct sway_container *parent = con->parent;
|
||||||
|
|
||||||
switch (con->type) {
|
if (con->type == C_VIEW) {
|
||||||
case C_TYPES:
|
|
||||||
case C_ROOT:
|
|
||||||
case C_OUTPUT:
|
|
||||||
case C_WORKSPACE:
|
|
||||||
case C_CONTAINER:
|
|
||||||
container_for_each_descendant_dfs(con, container_close_func, NULL);
|
|
||||||
break;
|
|
||||||
case C_VIEW:
|
|
||||||
view_close(con->sway_view);
|
view_close(con->sway_view);
|
||||||
break;
|
} else {
|
||||||
|
container_for_each_descendant_dfs(con, container_close_func, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
return parent;
|
return parent;
|
||||||
|
Loading…
Reference in New Issue
Block a user