Implement mark/goto, modify testcase

This commit is contained in:
Michael Stapelberg
2010-06-02 23:32:05 +02:00
parent 780e773a6a
commit 6897e15e72
6 changed files with 57 additions and 19 deletions

View File

@ -201,6 +201,7 @@ void tree_close_con() {
void tree_split(Con *con, orientation_t orientation) {
/* for a workspace, we just need to change orientation */
if (con->type == CT_WORKSPACE) {
DLOG("Workspace, simply changing orientation to %d\n", orientation);
con->orientation = orientation;
return;
}
@ -210,8 +211,12 @@ void tree_split(Con *con, orientation_t orientation) {
* child and has the same orientation like we are trying to
* set, this operation is a no-op to not confuse the user */
if (parent->orientation == orientation &&
TAILQ_NEXT(con, nodes) == TAILQ_END(&(parent->nodes_head)))
TAILQ_NEXT(con, nodes) == TAILQ_END(&(parent->nodes_head))) {
DLOG("Not splitting the same way again\n");
return;
}
DLOG("Splitting in orientation %d\n", orientation);
/* 2: replace it with a new Con */
Con *new = con_new(NULL);