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

Go to the source code of this file.

Data Structures

struct  callback_params
 

Enumerations

enum  drop_type_t { DT_SIBLING , DT_CENTER , DT_PARENT }
 

Functions

static xcb_window_t create_drop_indicator (Rect rect)
 
static bool is_tiling_drop_target (Con *con)
 
bool has_drop_targets (void)
 Returns whether there currently are any drop targets.
 
static Confind_drop_target (uint32_t x, uint32_t y)
 
static Rect adjust_rect (Rect rect, direction_t direction, uint32_t threshold)
 
static bool con_on_side_of_parent (Con *con, direction_t direction)
 
 DRAGGING_CB (drag_callback)
 
void tiling_drag (Con *con, xcb_button_press_event_t *event, bool use_threshold)
 Initiates a mouse drag operation on a tiled window.
 

Enumeration Type Documentation

◆ drop_type_t

Enumerator
DT_SIBLING 
DT_CENTER 
DT_PARENT 

Definition at line 96 of file tiling_drag.c.

Function Documentation

◆ adjust_rect()

static Rect adjust_rect ( Rect rect,
direction_t direction,
uint32_t threshold )
static

Definition at line 108 of file tiling_drag.c.

References D_DOWN, D_LEFT, D_RIGHT, D_UP, Rect::height, Rect::width, Rect::x, and Rect::y.

Referenced by DRAGGING_CB().

◆ con_on_side_of_parent()

static bool con_on_side_of_parent ( Con * con,
direction_t direction )
static

Definition at line 128 of file tiling_drag.c.

References con_descend_direction(), con_orientation(), D_DOWN, D_LEFT, D_RIGHT, D_UP, L_STACKED, L_TABBED, Con::layout, orientation_from_direction(), and Con::parent.

Referenced by DRAGGING_CB().

Here is the call graph for this function:

◆ create_drop_indicator()

static xcb_window_t create_drop_indicator ( Rect rect)
static

◆ DRAGGING_CB()

◆ find_drop_target()

static Con * find_drop_target ( uint32_t x,
uint32_t y )
static

◆ has_drop_targets()

bool has_drop_targets ( void )

Returns whether there currently are any drop targets.

Used to only initiate a drag when there is something to drop onto.

Definition at line 42 of file tiling_drag.c.

References all_cons, con_is_internal(), con_num_children(), croot, focused, GREP_FIRST, is_tiling_drop_target(), output_get_content(), TAILQ_FOREACH, and workspace_is_visible().

Referenced by route_click().

Here is the call graph for this function:

◆ is_tiling_drop_target()

static bool is_tiling_drop_target ( Con * con)
static

◆ tiling_drag()