i3
move.c File Reference
#include "all.h"
Include dependency graph for move.c:

Go to the source code of this file.

Functions

static Conlowest_common_ancestor (Con *a, Con *b)
static Conchild_containing_con_recursively (Con *ancestor, Con *con)
static bool is_focused_descendant (Con *con, Con *ancestor)
void insert_con_into (Con *con, Con *target, position_t position)
 This function detaches 'con' from its parent and inserts it either before or after 'target'.
static void attach_to_workspace (Con *con, Con *ws, direction_t direction)
static void move_to_output_directed (Con *con, direction_t direction)
void tree_move (Con *con, direction_t direction)
 Moves the given container in the given direction.

Function Documentation

◆ attach_to_workspace()

void attach_to_workspace ( Con * con,
Con * ws,
direction_t direction )
static

Definition at line 179 of file move.c.

References attach_to_workspace(), CALL, con_detach(), con_fix_percent(), D_DOWN, D_RIGHT, focused, Con::parent, Con::percent, TAILQ_INSERT_HEAD, and TAILQ_INSERT_TAIL.

Referenced by attach_to_workspace(), move_to_output_directed(), and tree_move().

Here is the call graph for this function:

◆ child_containing_con_recursively()

Con * child_containing_con_recursively ( Con * ancestor,
Con * con )
static

Definition at line 35 of file move.c.

References child_containing_con_recursively(), and Con::parent.

Referenced by child_containing_con_recursively(), and insert_con_into().

Here is the call graph for this function:

◆ insert_con_into()

void insert_con_into ( Con * con,
Con * target,
position_t position )

◆ is_focused_descendant()

bool is_focused_descendant ( Con * con,
Con * ancestor )
static

Definition at line 48 of file move.c.

References is_focused_descendant(), Con::parent, and TAILQ_FIRST.

Referenced by insert_con_into(), and is_focused_descendant().

Here is the call graph for this function:

◆ lowest_common_ancestor()

Con * lowest_common_ancestor ( Con * a,
Con * b )
static

Definition at line 16 of file move.c.

References lowest_common_ancestor(), and Con::parent.

Referenced by insert_con_into(), and lowest_common_ancestor().

Here is the call graph for this function:

◆ move_to_output_directed()

◆ tree_move()