i3
Data Structures | Functions

src/resize.c File Reference

#include <stdlib.h>
#include <assert.h>
#include <xcb/xcb.h>
#include <xcb/xcb_event.h>
#include "i3.h"
#include "data.h"
#include "resize.h"
#include "util.h"
#include "xcb.h"
#include "debug.h"
#include "layout.h"
#include "randr.h"
#include "config.h"
#include "floating.h"
#include "workspace.h"
#include "log.h"
Include dependency graph for resize.c:

Go to the source code of this file.

Data Structures

struct  callback_params

Functions

 DRAGGING_CB (resize_callback)
int resize_graphical_handler (xcb_connection_t *conn, Workspace *ws, int first, int second, resize_orientation_t orientation, xcb_button_press_event_t *event)
 Renders the resize window between the first/second container and resizes the table column/row.
static void adjust_container_factors (float *factors, int ws_size, int unoccupied_size, int num_items, int first, int second, int pixels)
void resize_container (xcb_connection_t *conn, Workspace *ws, int first, int second, resize_orientation_t orientation, int pixels)
 Resizes a column/row by the given amount of pixels.

Function Documentation

static void adjust_container_factors ( float *  factors,
int  ws_size,
int  unoccupied_size,
int  num_items,
int  first,
int  second,
int  pixels 
) [static]

Definition at line 162 of file resize.c.

Referenced by resize_container().

DRAGGING_CB ( resize_callback  )
void resize_container ( xcb_connection_t *  conn,
Workspace ws,
int  first,
int  second,
resize_orientation_t  orientation,
int  pixels 
)

Resizes a column/row by the given amount of pixels.

Called by resize_graphical_handler (the user clicked) or parse_resize_command (the user issued the command)

Definition at line 190 of file resize.c.

References adjust_container_factors(), Workspace::cols, get_unoccupied_x(), get_unoccupied_y(), Workspace::height_factor, O_VERTICAL, Workspace::rect, render_layout(), Workspace::rows, Rect::width, Workspace::width_factor, and workspace_height().

Referenced by parse_resize_command(), and resize_graphical_handler().

Here is the call graph for this function:

int resize_graphical_handler ( xcb_connection_t *  conn,
Workspace ws,
int  first,
int  second,
resize_orientation_t  orientation,
xcb_button_press_event_t *  event 
)