#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"
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. |
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 | ) |
Definition at line 47 of file resize.c.
References DLOG, Rect::height, callback_params::helpwin, callback_params::new_position, O_VERTICAL, callback_params::orientation, xoutput::rect, callback_params::screen, Rect::width, Rect::x, and Rect::y.
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().
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.
Definition at line 76 of file resize.c.
References Colortriple::border, BORDER_TOP, Config::client, config, create_window(), D_DOWN, D_RIGHT, DLOG, drag_pointer(), ELOG, Config::config_client::focused, get_output_containing(), get_output_most(), Rect::height, callback_params::helpwin, callback_params::new_position, O_VERTICAL, xoutput::rect, resize_container(), callback_params::screen, Rect::width, Rect::x, XCB_CURSOR_SB_H_DOUBLE_ARROW, XCB_CURSOR_SB_V_DOUBLE_ARROW, and Rect::y.
Referenced by floating_mod_on_tiled_client(), and handle_button_press().