Rename tree_close() to tree_close_internal().

It should be clear for callers of this function that this is an internal
function that skips certain validations which might be important. Therefore
we make it clear that this is an internal function by renaming it.

relates to #1761
This commit is contained in:
Ingo Bürk
2015-12-27 20:58:35 -05:00
parent dc463077d6
commit 0dd71674de
10 changed files with 28 additions and 28 deletions

View File

@ -162,7 +162,7 @@ void floating_enable(Con *con, bool automatic) {
}
/* 1: detach the container from its parent */
/* TODO: refactor this with tree_close() */
/* TODO: refactor this with tree_close_internal() */
TAILQ_REMOVE(&(con->parent->nodes_head), con, nodes);
TAILQ_REMOVE(&(con->parent->focus_head), con, focused);
@ -180,7 +180,7 @@ void floating_enable(Con *con, bool automatic) {
nc->layout = L_SPLITH;
/* We insert nc already, even though its rect is not yet calculated. This
* is necessary because otherwise the workspace might be empty (and get
* closed in tree_close()) even though its not. */
* closed in tree_close_internal()) even though its not. */
TAILQ_INSERT_TAIL(&(ws->floating_head), nc, floating_windows);
TAILQ_INSERT_TAIL(&(ws->focus_head), nc, focused);
@ -188,7 +188,7 @@ void floating_enable(Con *con, bool automatic) {
if ((con->parent->type == CT_CON || con->parent->type == CT_FLOATING_CON) &&
con_num_children(con->parent) == 0) {
DLOG("Old container empty after setting this child to floating, closing\n");
tree_close(con->parent, DONT_KILL_WINDOW, false, false);
tree_close_internal(con->parent, DONT_KILL_WINDOW, false, false);
}
char *name;
@ -333,7 +333,7 @@ void floating_disable(Con *con, bool automatic) {
/* 2: kill parent container */
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, DONT_KILL_WINDOW, true, false);
tree_close_internal(con->parent, DONT_KILL_WINDOW, true, false);
/* 3: re-attach to the parent of the currently focused con on the workspace
* this floating con was on */