i3
|
#include "all.h"
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 Con * | find_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. | |
enum drop_type_t |
Enumerator | |
---|---|
DT_SIBLING | |
DT_CENTER | |
DT_PARENT |
Definition at line 96 of file tiling_drag.c.
|
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().
|
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().
|
static |
Definition at line 271 of file tiling_drag.c.
References Config::client, color_t::colorpixel, config, conn, create_window(), Config::config_client::focused, callback_params::indicator, Colortriple::indicator, and XCURSOR_CURSOR_MOVE.
Referenced by DRAGGING_CB().
DRAGGING_CB | ( | drag_callback | ) |
Definition at line 158 of file tiling_drag.c.
References adjust_rect(), con_on_side_of_parent(), conn, create_drop_indicator(), D_DOWN, D_LEFT, D_RIGHT, D_UP, callback_params::direction, callback_params::drop_type, DT_CENTER, DT_PARENT, DT_SIBLING, ELOG, find_drop_target(), Rect::height, callback_params::indicator, logical_px(), max(), min(), Con::parent, Con::rect, render_deco_height(), callback_params::target, Con::type, Rect::width, Rect::x, x_mask_event_mask(), and Rect::y.
|
static |
Definition at line 73 of file tiling_drag.c.
References all_cons, xoutput::con, con_descend_tiling_focused(), con_get_fullscreen_covering_ws(), con_get_workspace(), get_output_containing(), is_tiling_drop_target(), output_get_content(), Con::rect, rect_contains(), TAILQ_FOREACH, and y.
Referenced by DRAGGING_CB().
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().
|
static |
Definition at line 13 of file tiling_drag.c.
References con_get_fullscreen_covering_ws(), con_get_workspace(), con_has_managed_window(), con_is_floating(), con_is_hidden(), con_is_internal(), and workspace_is_visible().
Referenced by find_drop_target(), and has_drop_targets().
void tiling_drag | ( | Con * | con, |
xcb_button_press_event_t * | event, | ||
bool | use_threshold ) |
Initiates a mouse drag operation on a tiled window.
Definition at line 304 of file tiling_drag.c.
References BEFORE, CF_NONE, CF_OUTPUT, con_activate(), con_disable_fullscreen(), con_enable_fullscreen(), con_exists(), con_focus(), con_get_fullscreen_covering_ws(), con_get_workspace(), con_move_to_target(), con_num_children(), con_orientation(), con_swap(), config, conn, callback_params::direction, direction_to_string(), DLOG, drag_pointer(), DRAG_REVERT, callback_params::drop_type, DT_CENTER, DT_PARENT, DT_SIBLING, ELOG, focused, Con::fullscreen_mode, callback_params::indicator, insert_con_into(), ipc_send_window_event(), L_SPLITH, L_SPLITV, L_STACKED, L_TABBED, Con::layout, callback_params::orientation, orientation_from_direction(), Con::parent, position_from_direction(), position_to_string(), Config::swap_modifier, TAILQ_FIRST, TAILQ_LAST, callback_params::target, tree_move(), tree_render(), tree_split(), VERT, workspace_show(), x_mask_event_mask(), and XCURSOR_CURSOR_MOVE.
Referenced by route_click().