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()

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

Definition at line 179 of file move.c.

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

Referenced by move_to_output_directed(), and tree_move().

Here is the call graph for this function:

◆ child_containing_con_recursively()

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

Definition at line 35 of file move.c.

References Con::parent.

Referenced by insert_con_into().

◆ insert_con_into()

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'.

Definition at line 65 of file move.c.

References AFTER, BEFORE, CALL, child_containing_con_recursively(), con_attach(), con_detach(), con_fix_percent(), DLOG, ELOG, focused, is_focused_descendant(), lowest_common_ancestor(), Con::parent, Con::percent, TAILQ_FOREACH, TAILQ_INSERT_AFTER, TAILQ_INSERT_BEFORE, TAILQ_INSERT_HEAD, TAILQ_INSERT_TAIL, TAILQ_PREV, TAILQ_REMOVE, Con::type, and workspace_attach_to().

Referenced by floating_disable(), tiling_drag(), and tree_move().

Here is the call graph for this function:

◆ is_focused_descendant()

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

Definition at line 48 of file move.c.

References Con::parent, and TAILQ_FIRST.

Referenced by insert_con_into().

◆ lowest_common_ancestor()

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

Definition at line 16 of file move.c.

References Con::parent.

Referenced by insert_con_into().

◆ move_to_output_directed()

◆ tree_move()