diff options
author | Taiyu <taiyu.len@gmail.com> | 2015-08-10 17:32:50 -0700 |
---|---|---|
committer | Taiyu <taiyu.len@gmail.com> | 2015-08-10 17:32:50 -0700 |
commit | beabb12d63437557da8a2e254a1e0250da448aa6 (patch) | |
tree | f3a0817c74125550a8442aae6cdf2e81e793d3e9 /sway/layout.c | |
parent | Merge pull request #14 from taiyu-len/master (diff) | |
download | sway-beabb12d63437557da8a2e254a1e0250da448aa6.tar.gz sway-beabb12d63437557da8a2e254a1e0250da448aa6.tar.zst sway-beabb12d63437557da8a2e254a1e0250da448aa6.zip |
destroys empty workspace + minor bugfixes
Diffstat (limited to 'sway/layout.c')
-rw-r--r-- | sway/layout.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/sway/layout.c b/sway/layout.c index bec1ec49..37f47673 100644 --- a/sway/layout.c +++ b/sway/layout.c | |||
@@ -119,7 +119,7 @@ void arrange_windows(swayc_t *container, int width, int height) { | |||
119 | } | 119 | } |
120 | } | 120 | } |
121 | 121 | ||
122 | void init_layout() { | 122 | void init_layout(void) { |
123 | root_container.type = C_ROOT; | 123 | root_container.type = C_ROOT; |
124 | root_container.layout = L_NONE; | 124 | root_container.layout = L_NONE; |
125 | root_container.children = create_list(); | 125 | root_container.children = create_list(); |
@@ -128,6 +128,9 @@ void init_layout() { | |||
128 | 128 | ||
129 | void free_swayc(swayc_t *container) { | 129 | void free_swayc(swayc_t *container) { |
130 | // NOTE: Does not handle moving children into a different container | 130 | // NOTE: Does not handle moving children into a different container |
131 | if (container->parent) { | ||
132 | remove_container_from_parent(container->parent, container); | ||
133 | } | ||
131 | list_free(container->children); | 134 | list_free(container->children); |
132 | if (container->name) { | 135 | if (container->name) { |
133 | free(container->name); | 136 | free(container->name); |