2 #define I3__FILE__ "move.c"
34 if (parent->
type == CT_WORKSPACE) {
36 if (split != parent) {
37 DLOG(
"Got a new split con, using that one instead\n");
44 DLOG(
"ok, continuing with con %p instead\n", con);
54 }
else if (position ==
AFTER) {
65 CALL(old_parent, on_remove_child);
109 DLOG(
"No output in this direction found. Not moving.\n");
117 DLOG(
"No workspace on output in this direction found. Not moving.\n");
143 DLOG(
"Moving in direction %d\n", direction);
148 if (con->
type == CT_WORKSPACE) {
149 DLOG(
"Not moving workspace\n");
167 if (!same_orientation) {
175 DLOG(
"Inside floating, moving to workspace\n");
179 DLOG(
"Force-changing orientation\n");
185 if (same_orientation == con->
parent) {
186 DLOG(
"We are in the same container\n");
190 DLOG(
"Moving into our bordering branch\n");
223 }
while (same_orientation == NULL);
229 while (above->
parent != same_orientation)
234 LOG(
"Cannot move out of fullscreen container\n");
238 DLOG(
"above = %p\n", above);
243 DLOG(
"Moving into the bordering branch of our adjacent container\n");
252 DLOG(
"Moving into container above\n");
void ipc_send_workspace_focus_event(Con *current, Con *old)
For the workspace "focus" event we send, along the usual "change" field, also the current and previou...
static void insert_con_into(Con *con, Con *target, position_t position)
Output * get_output_by_name(const char *name)
Returns the output with the given name if it is active (!) or NULL.
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_REMOVE(head, elm, field)
void con_attach(Con *con, Con *parent, bool ignore_focus)
Attaches the given container to the given parent.
Output * get_output_next(direction_t direction, Output *current, output_close_far_t close_far)
Gets the output which is the next one in the given direction.
Con * con_get_workspace(Con *con)
Gets the workspace container this node is on.
#define TAILQ_INSERT_BEFORE(listelm, elm, field)
bool workspace_is_visible(Con *ws)
Returns true if the workspace is currently visible.
void con_detach(Con *con)
Detaches the given container from its current parent.
static void move_to_output_directed(Con *con, direction_t direction)
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_parent_with_orientation(Con *con, orientation_t orientation)
Searches parenst of the given 'con' until it reaches one with the specified 'orientation'.
An Output is a physical output on your graphics driver.
#define TAILQ_NEXT(elm, field)
Con * con_descend_direction(Con *con, direction_t direction)
static void attach_to_workspace(Con *con, Con *ws, direction_t direction)
bool con_is_leaf(Con *con)
Returns true when this node is a leaf node (has no children)
struct deco_render_params * deco_render_params
Cache for the decoration rendering.
#define TAILQ_INSERT_HEAD(head, elm, field)
Con * con
Pointer to the Con which represents this output.
bool con_fullscreen_permits_focusing(Con *con)
Returns true if changing the focus to con would be allowed considering the fullscreen focus constrain...
#define TAILQ_INSERT_AFTER(head, listelm, elm, field)
void con_focus(Con *con)
Sets input focus to the given container.
int con_num_children(Con *con)
Returns the number of children of this container.
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...
void tree_flatten(Con *con)
tree_flatten() removes pairs of redundant split containers, e.g.
#define TAILQ_PREV(elm, headname, field)
#define GREP_FIRST(dest, head, condition)
orientation_t con_orientation(Con *con)
Returns the orientation of the given container (for stacked containers, vertical orientation is used ...
A 'Con' represents everything from the X11 root window down to a single X11 window.
#define CALL(obj, member,...)
#define TAILQ_INSERT_TAIL(head, elm, field)
Con * output_get_content(Con *output)
Returns the output container below the given output container.
Con * con_get_output(Con *con)
Gets the output container (first container with CT_OUTPUT in hierarchy) this node is on...
Con * con_inside_floating(Con *con)
Checks if the given container is either floating or inside some floating container.
void con_fix_percent(Con *con)
Updates the percent attribute of the children of the given container.
#define TAILQ_SWAP(first, second, head, field)
void tree_move(int direction)
Moves the current container in the given direction (TOK_LEFT, TOK_RIGHT, TOK_UP, TOK_DOWN from cmdpar...