]> git.sur5r.net Git - i3/i3/blobdiff - src/tree.c
Ensure that the "border" command uses logical pixels.
[i3/i3] / src / tree.c
index 5a6129ac86e60f2df9107b0522656ec1d876553d..0c301209e7ec6efdf6afe9767ddabb7cb7d85c25 100644 (file)
@@ -266,11 +266,8 @@ bool tree_close_internal(Con *con, kill_window_t kill_window, bool dont_kill_par
             add_ignore_event(cookie.sequence, 0);
         }
         ipc_send_window_event("close", con);
-        FREE(con->window->class_class);
-        FREE(con->window->class_instance);
-        i3string_free(con->window->name);
-        FREE(con->window->ran_assignments);
-        FREE(con->window);
+        window_free(con->window);
+        con->window = NULL;
     }
 
     Con *ws = con_get_workspace(con);
@@ -328,6 +325,12 @@ bool tree_close_internal(Con *con, kill_window_t kill_window, bool dont_kill_par
     free(con->name);
     FREE(con->deco_render_params);
     TAILQ_REMOVE(&all_cons, con, all_cons);
+    while (!TAILQ_EMPTY(&(con->swallow_head))) {
+        Match *match = TAILQ_FIRST(&(con->swallow_head));
+        TAILQ_REMOVE(&(con->swallow_head), match, matches);
+        match_free(match);
+        free(match);
+    }
     free(con);
 
     /* in the case of floating windows, we already focused another container