i3
Macros | Enumerations | Functions
click.c File Reference
#include "all.h"
#include <time.h>
#include <math.h>
#include <xcb/xcb_atom.h>
#include <xcb/xcb_icccm.h>
#include <X11/XKBlib.h>
Include dependency graph for click.c:

Go to the source code of this file.

Macros

#define I3__FILE__   "click.c"

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)
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)
static int route_click (Con *con, xcb_button_press_event_t *event, const bool mod_pressed, const click_destination_t dest)
int handle_button_press (xcb_button_press_event_t *event)
 The button press X callback.

Macro Definition Documentation

#define I3__FILE__   "click.c"

Definition at line 2 of file click.c.

Enumeration Type Documentation

Enumerator:
CLICK_BORDER 
CLICK_DECORATION 
CLICK_INSIDE 

Definition at line 22 of file click.c.

Function Documentation

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

Definition at line 90 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:

int 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 299 of file click.c.

References CLICK_BORDER, CLICK_DECORATION, CLICK_INSIDE, con_by_frame_id(), con_by_window_id(), config, conn, Con::deco_rect, DLOG, ELOG, Config::floating_modifier, last_timestamp, rect_contains(), route_click(), and TAILQ_FOREACH.

Referenced by handle_event().

Here is the call graph for this function:

static int route_click ( Con con,
xcb_button_press_event_t *  event,
const bool  mod_pressed,
const click_destination_t  dest 
)
static
static bool tiling_resize ( Con con,
xcb_button_press_event_t *  event,
const click_destination_t  dest 
)
static
static bool tiling_resize_for_border ( Con con,
border_t  border,
xcb_button_press_event_t *  event 
)
static

Definition at line 30 of file click.c.

References BORDER_BOTTOM, BORDER_LEFT, BORDER_TOP, con_orientation(), DLOG, HORIZ, Con::parent, resize_graphical_handler(), TAILQ_END, TAILQ_NEXT, TAILQ_PREV, tree_render(), Con::type, and VERT.

Referenced by floating_mod_on_tiled_client(), and tiling_resize().

Here is the call graph for this function: