* container.
*
*/
-void con_fix_percent(Con *con, int action);
-enum { WINDOW_ADD = 0, WINDOW_REMOVE = 1 };
+void con_fix_percent(Con *con);
/**
* Toggles fullscreen mode for the given container. Fullscreen mode will not be
* container.
*
*/
-void con_fix_percent(Con *con, int action) {
+void con_fix_percent(Con *con) {
Con *child;
int children = con_num_children(con);
TAILQ_REMOVE(&(con->parent->nodes_head), con, nodes);
TAILQ_REMOVE(&(con->parent->focus_head), con, focused);
- con_fix_percent(con->parent, WINDOW_REMOVE);
+ con_fix_percent(con->parent);
/* 2: create a new container to render the decoration on, add
* it as a floating window to the workspace */
con->floating = FLOATING_USER_OFF;
- con_fix_percent(con->parent, WINDOW_ADD);
+ con_fix_percent(con->parent);
// TODO: don’t influence focus handling when Con was not focused before.
con_focus(con);
}
Con *new = con_new(con);
/* 4: re-calculate child->percent for each child */
- con_fix_percent(con, WINDOW_ADD);
+ con_fix_percent(con);
/* 5: focus the new container */
con_focus(new);
if (con->type != CT_FLOATING_CON) {
/* If the container is *not* floating, we might need to re-distribute
* percentage values for the resized containers. */
- con_fix_percent(parent, WINDOW_REMOVE);
+ con_fix_percent(parent);
}
if (con_is_floating(con)) {