Implement 'split'

This commit is contained in:
Michael Stapelberg
2010-05-10 09:33:10 +02:00
parent 145ebc7584
commit 6a1c34d2c5
7 changed files with 86 additions and 8 deletions

View File

@ -167,6 +167,11 @@ void tree_close_con() {
*
*/
void tree_split(Con *con, orientation_t orientation) {
/* for a workspace, we just need to change orientation */
if (con->parent->type == CT_OUTPUT) {
con->orientation = orientation;
return;
}
/* 2: replace it with a new Con */
Con *new = con_new(NULL);
Con *parent = con->parent;