diff options
author | Drew DeVault <[email protected]> | 2015-08-10 23:26:04 -0400 |
---|---|---|
committer | Drew DeVault <[email protected]> | 2015-08-10 23:26:04 -0400 |
commit | e62e294366e634dbd584ea8fd2a9ed93aa81e356 (patch) | |
tree | 41a39c63ff375b81272bcfcec7719e510359d858 /sway/layout.c | |
parent | 4aeaaa8abc35ff6ce9746802169918d33e7b8e61 (diff) | |
parent | 25a3aa6ed675c70a7cb83aca0ec5eccae23e42fa (diff) |
Merge pull request #15 from taiyu-len/master
destroys empty workspace + minor fixes
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) { } } -void init_layout() { +void init_layout(void) { root_container.type = C_ROOT; root_container.layout = L_NONE; root_container.children = create_list(); @@ -128,6 +128,9 @@ void init_layout() { void free_swayc(swayc_t *container) { // NOTE: Does not handle moving children into a different container + if (container->parent) { + remove_container_from_parent(container->parent, container); + } list_free(container->children); if (container->name) { free(container->name); |