};
focused = croot;
- tree_append_json(globbed);
+ tree_append_json(globbed, NULL);
printf("appended tree, using new root\n");
croot = TAILQ_FIRST(&(croot->nodes_head));
if (focused->type == CT_WORKSPACE) {
DLOG("Workspaces cannot be close, closing all children instead\n");
Con *child, *nextchild;
- for (child = TAILQ_FIRST(&(focused->nodes_head)); child; ) {
- nextchild = TAILQ_NEXT(child, nodes);
+ for (child = TAILQ_FIRST(&(focused->focus_head)); child; ) {
+ nextchild = TAILQ_NEXT(child, focused);
DLOG("killing child=%p\n", child);
tree_close(child, kill_window, false, false);
child = nextchild;
*
*/
void tree_split(Con *con, orientation_t orientation) {
- if (con->type == CT_FLOATING_CON) {
+ if (con_is_floating(con)) {
DLOG("Floating containers can't be split.\n");
return;
}