fix_floating_parent(child, vanishing);
}
+static bool _is_con_mapped(Con *con) {
+ Con *child;
+
+ TAILQ_FOREACH(child, &(con->nodes_head), nodes)
+ if (_is_con_mapped(child))
+ return true;
+
+ return con->mapped;
+}
+
/*
* Closes the given container including all children
*
bool was_mapped = con->mapped;
Con *parent = con->parent;
+ if (!was_mapped) {
+ /* Even if the container itself is not mapped, its children may be
+ * mapped (for example split containers don't have a mapped window on
+ * their own but usually contain mapped children). */
+ was_mapped = _is_con_mapped(con);
+ }
+
/* check floating clients and adjust old_parent if necessary */
fix_floating_parent(croot, con);
return;
}
+ /* There *should* be no possibility to focus outputs / root container */
+ assert(focused->type != CT_OUTPUT);
+ assert(focused->type != CT_ROOT);
+
/* Kill con */
tree_close(focused, true, false);
}