2 #define I3__FILE__ "move.c"
33 if (parent->
type == CT_WORKSPACE) {
35 if (split != parent) {
36 DLOG(
"Got a new split con, using that one instead\n");
43 DLOG(
"ok, continuing with con %p instead\n", con);
53 }
else if (position ==
AFTER) {
64 CALL(old_parent, on_remove_child);
96 DLOG(
"Moving in direction %d\n", direction);
100 if (con->
type == CT_WORKSPACE) {
101 DLOG(
"Not moving workspace\n");
106 DLOG(
"This is the only con on this workspace, not doing anything\n");
118 if (!same_orientation) {
126 DLOG(
"Inside floating, moving to workspace\n");
130 DLOG(
"Force-changing orientation\n");
136 if (same_orientation == con->
parent) {
137 DLOG(
"We are in the same container\n");
139 if ((swap = (direction ==
D_LEFT || direction ==
D_UP ?
165 }
while (same_orientation == NULL);
171 while (above->
parent != same_orientation)
176 LOG(
"Cannot move out of fullscreen container\n");
180 DLOG(
"above = %p\n", above);
183 if (direction ==
D_UP || direction ==
D_LEFT) {
A 'Con' represents everything from the X11 root window down to a single X11 window.
#define TAILQ_INSERT_TAIL(head, elm, field)
#define TAILQ_SWAP(first, second, head, field)
void con_attach(Con *con, Con *parent, bool ignore_focus)
Attaches the given container to the given parent.
int con_num_children(Con *con)
Returns the number of children of this container.
#define TAILQ_PREV(elm, headname, field)
#define TAILQ_INSERT_HEAD(head, elm, field)
void floating_disable(Con *con, bool automatic)
Disables floating mode for the given container by re-attaching the container to its old parent...
Con * con_get_workspace(Con *con)
Gets the workspace container this node is on.
void con_fix_percent(Con *con)
Updates the percent attribute of the children of the given container.
#define TAILQ_INSERT_BEFORE(listelm, elm, field)
#define TAILQ_REMOVE(head, elm, field)
Con * con_parent_with_orientation(Con *con, orientation_t orientation)
Searches parenst of the given 'con' until it reaches one with the specified 'orientation'.
static void insert_con_into(Con *con, Con *target, position_t position)
void ws_force_orientation(Con *ws, orientation_t orientation)
'Forces' workspace orientation by moving all cons into a new split-con with the same orientation as t...
static void attach_to_workspace(Con *con, Con *ws)
void tree_flatten(Con *con)
tree_flatten() removes pairs of redundant split containers, e.g.
#define CALL(obj, member,...)
Con * con_descend_focused(Con *con)
Returns the focused con inside this client, descending the tree as far as possible.
bool con_is_leaf(Con *con)
Returns true when this node is a leaf node (has no children)
#define TAILQ_NEXT(elm, field)
void con_focus(Con *con)
Sets input focus to the given container.
void tree_move(int direction)
Moves the current container in the given direction (TOK_LEFT, TOK_RIGHT, TOK_UP, TOK_DOWN from cmdpar...
struct deco_render_params * deco_render_params
Cache for the decoration rendering.
void con_detach(Con *con)
Detaches the given container from its current parent.
bool con_is_floating(Con *con)
Returns true if the node is floating.
Con * workspace_attach_to(Con *ws)
Called when a new con (with a window, not an empty or split con) should be attached to the workspace ...
#define TAILQ_INSERT_AFTER(head, listelm, elm, field)
Con * con_inside_floating(Con *con)
Checks if the given container is either floating or inside some floating container.
bool con_fullscreen_permits_focusing(Con *con)
Returns true if changing the focus to con would be allowed considering the fullscreen focus constrain...