Destroy containers when all views are removed

This commit is contained in:
Drew DeVault 2015-08-09 19:32:03 -04:00
parent 2231586569
commit 1669da719c

View file

@ -216,6 +216,10 @@ void destroy_view(swayc_t *view) {
} }
arrange_windows(parent, -1, -1); arrange_windows(parent, -1, -1);
if (parent->children->length == 0 && parent->type == C_CONTAINER) {
destroy_view(parent);
}
} }
void unfocus_all(swayc_t *container) { void unfocus_all(swayc_t *container) {