diff options
author | Drew DeVault <sir@cmpwn.com> | 2015-08-09 19:32:03 -0400 |
---|---|---|
committer | Drew DeVault <sir@cmpwn.com> | 2015-08-09 19:32:03 -0400 |
commit | 1669da719c96e80cc5c462bbd648b17c7cd25a82 (patch) | |
tree | 4ba478ccd45bbbfe03ae93c16fc9fa3b40109ffb /sway | |
parent | Implement splith/splitv (diff) | |
download | sway-1669da719c96e80cc5c462bbd648b17c7cd25a82.tar.gz sway-1669da719c96e80cc5c462bbd648b17c7cd25a82.tar.zst sway-1669da719c96e80cc5c462bbd648b17c7cd25a82.zip |
Destroy containers when all views are removed
Diffstat (limited to 'sway')
-rw-r--r-- | sway/layout.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/sway/layout.c b/sway/layout.c index 2ce0a559..6bb19d63 100644 --- a/sway/layout.c +++ b/sway/layout.c | |||
@@ -216,6 +216,10 @@ void destroy_view(swayc_t *view) { | |||
216 | } | 216 | } |
217 | 217 | ||
218 | arrange_windows(parent, -1, -1); | 218 | arrange_windows(parent, -1, -1); |
219 | |||
220 | if (parent->children->length == 0 && parent->type == C_CONTAINER) { | ||
221 | destroy_view(parent); | ||
222 | } | ||
219 | } | 223 | } |
220 | 224 | ||
221 | void unfocus_all(swayc_t *container) { | 225 | void unfocus_all(swayc_t *container) { |