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:
@ -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 it’s not. */
|
||||
* closed in tree_close_internal()) even though it’s 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 */
|
||||
|
Reference in New Issue
Block a user