]> git.sur5r.net Git - i3/i3/blobdiff - src/tree.c
replace remaining printf()s with D?LOG
[i3/i3] / src / tree.c
index 046d0b4c18caec263fd41f84ae70380c7e5ced55..9c8f56026f7baf95a1d2e0405ca5efb8a4d3bc82 100644 (file)
@@ -84,15 +84,15 @@ 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");
+    DLOG("appended tree, using new root\n");
     croot = TAILQ_FIRST(&(croot->nodes_head));
-    printf("new root = %p\n", croot);
+    DLOG("new root = %p\n", croot);
     Con *out = TAILQ_FIRST(&(croot->nodes_head));
-    printf("out = %p\n", out);
+    DLOG("out = %p\n", out);
     Con *ws = TAILQ_FIRST(&(out->nodes_head));
-    printf("ws = %p\n", ws);
+    DLOG("ws = %p\n", ws);
 
     /* For in-place restarting into v4.2, we need to make sure the new
      * pseudo-output __i3 is present. */
@@ -260,7 +260,8 @@ bool tree_close(Con *con, kill_window_t kill_window, bool dont_kill_parent, bool
         FREE(con->window->class_class);
         FREE(con->window->class_instance);
         i3string_free(con->window->name);
-        free(con->window);
+        FREE(con->window->ran_assignments);
+        FREE(con->window);
     }
 
     Con *ws = con_get_workspace(con);
@@ -387,7 +388,7 @@ void tree_close_con(kill_window_t kill_window) {
  *
  */
 void tree_split(Con *con, orientation_t orientation) {
-    if (con->type == CT_FLOATING_CON) {
+    if (con_is_floating(con)) {
         DLOG("Floating containers can't be split.\n");
         return;
     }