revert the replacement of a single h/v-split with its child container
Makes more problems than it creates. Will use a different fix suggested by Merovius.
This commit is contained in:
parent
53d9072ca7
commit
6a6746b967
24
src/con.c
24
src/con.c
|
@ -787,28 +787,4 @@ static void con_on_remove_child(Con *con) {
|
|||
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;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -109,7 +109,7 @@ is(@{$content}, 3, 'three nodes on this workspace');
|
|||
# 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
|
||||
|
|
Loading…
Reference in New Issue