i3
click.c File Reference
#include "all.h"
#include <time.h>
Include dependency graph for click.c:

Go to the source code of this file.

Enumerations

enum  click_destination_t { CLICK_BORDER = 0 , CLICK_DECORATION = 1 , CLICK_INSIDE = 2 }
 

Functions

static bool tiling_resize_for_border (Con *con, border_t border, xcb_button_press_event_t *event, bool use_threshold)
 
static bool floating_mod_on_tiled_client (Con *con, xcb_button_press_event_t *event)
 
static bool tiling_resize (Con *con, xcb_button_press_event_t *event, const click_destination_t dest, bool use_threshold)
 
static void allow_replay_pointer (xcb_timestamp_t time)
 
static void route_click (Con *con, xcb_button_press_event_t *event, const click_destination_t dest)
 
void handle_button_press (xcb_button_press_event_t *event)
 The button press X callback.
 

Enumeration Type Documentation

◆ click_destination_t

Enumerator
CLICK_BORDER 
CLICK_DECORATION 
CLICK_INSIDE 

Definition at line 14 of file click.c.

Function Documentation

◆ allow_replay_pointer()

static void allow_replay_pointer ( xcb_timestamp_t time)
static

Definition at line 158 of file click.c.

References conn, and tree_render().

Referenced by route_click().

Here is the call graph for this function:

◆ floating_mod_on_tiled_client()

static bool floating_mod_on_tiled_client ( Con * con,
xcb_button_press_event_t * event )
static

Definition at line 84 of file click.c.

References BORDER_BOTTOM, BORDER_LEFT, BORDER_RIGHT, BORDER_TOP, DLOG, Rect::height, Con::rect, tiling_resize_for_border(), and Rect::width.

Referenced by route_click().

Here is the call graph for this function:

◆ handle_button_press()

void handle_button_press ( xcb_button_press_event_t * event)

The button press X callback.

This function determines whether the floating modifier is pressed and where the user clicked (decoration, border, inside the window).

Then, route_click is called on the appropriate con.

Definition at line 372 of file click.c.

References CLICK_BORDER, CLICK_DECORATION, CLICK_INSIDE, command_result_free(), con_by_frame_id(), con_by_window_id(), con_get_workspace(), con_is_internal(), conn, croot, Con::deco_rect, DLOG, ELOG, focused, get_binding_from_xcb_event(), last_timestamp, output_get_content(), Con::rect, rect_contains(), root, route_click(), run_binding(), TAILQ_FIRST, TAILQ_FOREACH, TAILQ_FOREACH_REVERSE, tree_render(), Binding::whole_window, Con::window, and workspace_show().

Referenced by handle_event().

Here is the call graph for this function:

◆ route_click()

◆ tiling_resize()

static bool tiling_resize ( Con * con,
xcb_button_press_event_t * event,
const click_destination_t dest,
bool use_threshold )
static

◆ tiling_resize_for_border()

static bool tiling_resize_for_border ( Con * con,
border_t border,
xcb_button_press_event_t * event,
bool use_threshold )
static