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

@ -1162,7 +1162,7 @@ orientation_t con_orientation(Con *con) {
/*
* Returns the container which will be focused next when the given container
* is not available anymore. Called in tree_close and con_move_to_workspace
* is not available anymore. Called in tree_close_internal and con_move_to_workspace
* to properly restore focus.
*
*/
@ -1678,7 +1678,7 @@ static void con_on_remove_child(Con *con) {
if (TAILQ_EMPTY(&(con->focus_head)) && !workspace_is_visible(con)) {
LOG("Closing old workspace (%p / %s), it is empty\n", con, con->name);
yajl_gen gen = ipc_marshal_workspace_event("empty", con, NULL);
tree_close(con, DONT_KILL_WINDOW, false, false);
tree_close_internal(con, DONT_KILL_WINDOW, false, false);
const unsigned char *payload;
ylength length;
@ -1699,7 +1699,7 @@ static void con_on_remove_child(Con *con) {
int children = con_num_children(con);
if (children == 0) {
DLOG("Container empty, closing\n");
tree_close(con, DONT_KILL_WINDOW, false, false);
tree_close_internal(con, DONT_KILL_WINDOW, false, false);
return;
}
}