layout restoring: append at the nearest split container (or workspace) (Thanks chris)

Before this commit, leaf containers (such as terminal emulators) would
get children appended, which is not intended.

fixes #1223
This commit is contained in:
Michael Stapelberg
2014-04-18 20:30:27 +02:00
parent 702906d0cf
commit 524f20b8a0
4 changed files with 14 additions and 6 deletions

View File

@ -84,7 +84,7 @@ bool tree_restore(const char *path, xcb_get_geometry_reply_t *geometry) {
};
focused = croot;
tree_append_json(globbed, NULL);
tree_append_json(focused, globbed, NULL);
printf("appended tree, using new root\n");
croot = TAILQ_FIRST(&(croot->nodes_head));