]> git.sur5r.net Git - i3/i3/blobdiff - src/tree.c
Merge branch 'master' into next
[i3/i3] / src / tree.c
index 65d709a557220489ab2b0f1c7a8ee4cc9f4af3aa..046d0b4c18caec263fd41f84ae70380c7e5ced55 100644 (file)
@@ -84,7 +84,7 @@ bool tree_restore(const char *path, xcb_get_geometry_reply_t *geometry) {
     };
     focused = croot;
 
-    tree_append_json(globbed);
+    tree_append_json(globbed, NULL);
 
     printf("appended tree, using new root\n");
     croot = TAILQ_FIRST(&(croot->nodes_head));
@@ -367,8 +367,8 @@ void tree_close_con(kill_window_t kill_window) {
     if (focused->type == CT_WORKSPACE) {
         DLOG("Workspaces cannot be close, closing all children instead\n");
         Con *child, *nextchild;
-        for (child = TAILQ_FIRST(&(focused->nodes_head)); child; ) {
-            nextchild = TAILQ_NEXT(child, nodes);
+        for (child = TAILQ_FIRST(&(focused->focus_head)); child; ) {
+            nextchild = TAILQ_NEXT(child, focused);
             DLOG("killing child=%p\n", child);
             tree_close(child, kill_window, false, false);
             child = nextchild;