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

Go to the source code of this file.

Functions

gaps_t calculate_effective_gaps (Con *con)
 Calculates the effective gap sizes for a container.
 
bool gaps_should_inset_con (Con *con, int children)
 
bool gaps_has_adjacent_container (Con *con, direction_t direction)
 
gaps_t gaps_for_workspace (Con *ws)
 Returns the configured gaps for this workspace based on the workspace name, number, and configured workspace gap assignments.
 
void gaps_reapply_workspace_assignments (void)
 Re-applies all workspace gap assignments to existing workspaces after reloading the configuration file.
 

Function Documentation

◆ calculate_effective_gaps()

gaps_t calculate_effective_gaps ( Con * con)

Calculates the effective gap sizes for a container.

Definition at line 16 of file gaps.c.

References gaps_t::bottom, con_get_workspace(), con_num_children(), con_num_visible_children(), config, Con::gaps, Config::gaps, gaps_t::inner, L_STACKED, L_TABBED, gaps_t::left, gaps_t::right, Config::smart_gaps, SMART_GAPS_INVERSE_OUTER, SMART_GAPS_ON, TAILQ_FIRST, and gaps_t::top.

Referenced by con_border_style_rect_without_title(), and render_con().

Here is the call graph for this function:

◆ gaps_for_workspace()

gaps_t gaps_for_workspace ( Con * ws)

Returns the configured gaps for this workspace based on the workspace name, number, and configured workspace gap assignments.

Definition at line 124 of file gaps.c.

References gaps_t::bottom, config, Config::gaps, Workspace_Assignment::gaps, GAPS_BOTTOM, GAPS_INNER, GAPS_LEFT, Workspace_Assignment::gaps_mask, GAPS_RIGHT, GAPS_TOP, gaps_t::inner, gaps_t::left, Con::name, Workspace_Assignment::name, Con::num, gaps_t::right, TAILQ_FOREACH, gaps_t::top, ws_assignments, and ws_name_to_number().

Referenced by create_workspace_on_output(), gaps_reapply_workspace_assignments(), and workspace_get().

Here is the call graph for this function:

◆ gaps_has_adjacent_container()

bool gaps_has_adjacent_container ( Con * con,
direction_t direction )

Definition at line 92 of file gaps.c.

References CF_GLOBAL, CF_OUTPUT, con_get_fullscreen_con(), con_get_workspace(), con_has_parent(), and resize_find_tiling_participants().

Referenced by render_con().

Here is the call graph for this function:

◆ gaps_reapply_workspace_assignments()

void gaps_reapply_workspace_assignments ( void )

Re-applies all workspace gap assignments to existing workspaces after reloading the configuration file.

Definition at line 166 of file gaps.c.

References croot, DLOG, Con::gaps, gaps_for_workspace(), Con::name, Workspace_Assignment::output, output_get_content(), and TAILQ_FOREACH.

Referenced by load_configuration().

Here is the call graph for this function:

◆ gaps_should_inset_con()

bool gaps_should_inset_con ( Con * con,
int children )

Definition at line 51 of file gaps.c.

References con_inside_floating(), con_inside_stacked_or_tabbed(), con_is_leaf(), L_SPLITH, L_SPLITV, L_STACKED, L_TABBED, Con::layout, Con::parent, and Con::type.

Referenced by render_con().

Here is the call graph for this function: