]> git.sur5r.net Git - i3/i3/blobdiff - src/tree.c
fix warnings: unsigned check for >= 0 is always true
[i3/i3] / src / tree.c
index 65d709a557220489ab2b0f1c7a8ee4cc9f4af3aa..48ab163da596c94b1811c6082e61adb6b5bbda37 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;
@@ -387,7 +387,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;
     }