aboutsummaryrefslogtreecommitdiffstats
path: root/sway/tree/container.c
diff options
context:
space:
mode:
authorLibravatar Tony Crisci <tony@dubstepdish.com>2018-03-31 13:20:05 -0400
committerLibravatar Tony Crisci <tony@dubstepdish.com>2018-03-31 15:37:16 -0400
commite7ecb001d70c71f799547d15cd45c235412af402 (patch)
treea14ba05280f3c8b21f96b546509d5ce78b47b8ac /sway/tree/container.c
parenttemporarily add LD_LIBRARY_PATH stuff (diff)
downloadsway-e7ecb001d70c71f799547d15cd45c235412af402.tar.gz
sway-e7ecb001d70c71f799547d15cd45c235412af402.tar.zst
sway-e7ecb001d70c71f799547d15cd45c235412af402.zip
reap container parent on destroy
Diffstat (limited to 'sway/tree/container.c')
-rw-r--r--sway/tree/container.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/sway/tree/container.c b/sway/tree/container.c
index 7b88cccb..f972ac24 100644
--- a/sway/tree/container.c
+++ b/sway/tree/container.c
@@ -58,7 +58,7 @@ struct sway_container *container_create(enum sway_container_type type) {
58 return c; 58 return c;
59} 59}
60 60
61struct sway_container *container_destroy(struct sway_container *cont) { 61static struct sway_container *_container_destroy(struct sway_container *cont) {
62 if (cont == NULL) { 62 if (cont == NULL) {
63 return NULL; 63 return NULL;
64 } 64 }
@@ -89,6 +89,11 @@ struct sway_container *container_destroy(struct sway_container *cont) {
89 return parent; 89 return parent;
90} 90}
91 91
92struct sway_container *container_destroy(struct sway_container *cont) {
93 cont = _container_destroy(cont);
94 return container_reap_empty(cont->parent);
95}
96
92struct sway_container *container_output_create( 97struct sway_container *container_output_create(
93 struct sway_output *sway_output) { 98 struct sway_output *sway_output) {
94 struct wlr_box size; 99 struct wlr_box size;