tree_close(con, false, false);
return;
}
-
- /* If we did not close the container, check if we have only a single child left */
- if (children == 1) {
- Con *child = TAILQ_FIRST(&(con->nodes_head));
- Con *parent = con->parent;
- DLOG("Container has only one child, replacing con %p with child %p\n", con, child);
-
- /* TODO: refactor it into con_swap */
- TAILQ_REPLACE(&(parent->nodes_head), con, child, nodes);
- TAILQ_REPLACE(&(parent->focus_head), con, child, focused);
- if (focused == con)
- focused = child;
- child->parent = parent;
- child->percent = 0.0;
- con_fix_percent(parent);
-
- con->parent = NULL;
- x_con_kill(con);
- free(con->name);
- TAILQ_REMOVE(&all_cons, con, all_cons);
- free(con);
-
- return;
- }
}
# will be replaced by the con itself, so we will still have 3 nodes
$i3->command('move right')->recv;
$content = get_ws_content($tmp);
-is(@{$content}, 3, 'two nodes on this workspace');
+is(@{$content}, 2, 'two nodes on this workspace');
######################################################################
# 4) We create two v-split containers on the workspace, then we move