From: Michael Stapelberg Date: Mon, 28 Jun 2010 20:37:35 +0000 (+0200) Subject: floating: correctly kill floating containers when closing X-Git-Tag: tree-pr1~177 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=948378fa554815c4b010e5e939334e4430806507;p=i3%2Fi3 floating: correctly kill floating containers when closing --- diff --git a/src/tree.c b/src/tree.c index a6f3dc13..d3e83875 100644 --- a/src/tree.c +++ b/src/tree.c @@ -174,6 +174,14 @@ void tree_close(Con *con, bool kill_window) { con_detach(con); con_fix_percent(con->parent, WINDOW_REMOVE); + if (con_is_floating(con)) { + DLOG("Container was floating, killing floating container\n"); + + TAILQ_REMOVE(&(con->parent->parent->floating_head), con->parent, floating_windows); + TAILQ_REMOVE(&(con->parent->parent->focus_head), con->parent, focused); + tree_close(con->parent, false); + } + free(con->name); TAILQ_REMOVE(&all_cons, con, all_cons); free(con);