Bugfix: Properly split when the current container is alone within a stacked/tabbed con (+test) (Thanks aksr)

Fixes: #630
This commit is contained in:
Michael Stapelberg
2012-01-30 16:13:44 +00:00
parent b5d8ed1bed
commit 0fc459892e
2 changed files with 23 additions and 1 deletions

View File

@ -291,7 +291,8 @@ void tree_split(Con *con, orientation_t orientation) {
/* if we are in a container whose parent contains only one
* child (its split functionality is unused so far), we just change the
* orientation (more intuitive than splitting again) */
if (con_num_children(parent) == 1) {
if (con_num_children(parent) == 1 &&
parent->layout == L_DEFAULT) {
parent->orientation = orientation;
DLOG("Just changing orientation of existing container\n");
return;