diff options
author | Tony Crisci <tony@dubstepdish.com> | 2018-04-03 11:27:27 -0400 |
---|---|---|
committer | Tony Crisci <tony@dubstepdish.com> | 2018-04-03 11:27:27 -0400 |
commit | 7afbe9284ff1ca2eece6da1838061cad9ed655e0 (patch) | |
tree | 5d5189467a1d5f7dc07b3e8d84ed81886a4771c0 /sway/tree | |
parent | 33006c4e64c7f12ecb7dc199f0452712a520860b (diff) |
rename _container_destroy to container_finish
Diffstat (limited to 'sway/tree')
-rw-r--r-- | sway/tree/container.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/sway/tree/container.c b/sway/tree/container.c index cb407f0e..d9fc61e7 100644 --- a/sway/tree/container.c +++ b/sway/tree/container.c @@ -77,7 +77,7 @@ struct sway_container *container_create(enum sway_container_type type) { return c; } -static struct sway_container *_container_destroy(struct sway_container *cont) { +static struct sway_container *container_finish(struct sway_container *cont) { if (cont == NULL) { return NULL; } @@ -124,13 +124,13 @@ static void reap_empty_func(struct sway_container *con, void *data) { break; case C_CONTAINER: if (con->children->length == 0) { - _container_destroy(con); + container_finish(con); } else if (con->children->length == 1) { struct sway_container *only_child = con->children->items[0]; if (only_child->type == C_CONTAINER) { container_remove_child(only_child); container_replace_child(con, only_child); - _container_destroy(con); + container_finish(con); } } case C_VIEW: @@ -146,6 +146,7 @@ struct sway_container *container_reap_empty(struct sway_container *container) { return parent; } + void container_destroy(struct sway_container *cont) { if (cont == NULL) { return; @@ -155,7 +156,7 @@ void container_destroy(struct sway_container *cont) { assert(false && "dont destroy containers with children"); } - _container_destroy(cont); + container_finish(cont); container_reap_empty(&root_container); } |