#include "data.h"
#include <xcb/randr.h>
Go to the source code of this file.
Functions | |
TAILQ_HEAD (outputs_head, xoutput) | |
void | initialize_randr (xcb_connection_t *conn, int *event_base) |
We have just established a connection to the X server and need the initial XRandR information to setup workspaces for each screen. | |
void | disable_randr (xcb_connection_t *conn) |
Disables RandR support by creating exactly one output with the size of the X11 screen. | |
void | initialize_output (xcb_connection_t *conn, Output *output, Workspace *workspace) |
Initializes the specified output, assigning the specified workspace to it. | |
void | randr_query_outputs (xcb_connection_t *conn) |
(Re-)queries the outputs via RandR and stores them in the list of outputs. | |
Output * | get_first_output () |
Returns the first output which is active. | |
Output * | get_output_by_name (const char *name) |
Returns the output with the given name if it is active (!) or NULL. | |
Output * | get_output_containing (int x, int y) |
Returns the active (!) output which contains the coordinates x, y or NULL if there is no output which contains these coordinates. | |
Output * | get_output_most (direction_t direction, Output *current) |
Gets the output which is the last one in the given direction, for example the output on the most bottom when direction == D_DOWN, the output most right when direction == D_RIGHT and so on. | |
Variables | |
struct outputs_head | outputs |
void disable_randr | ( | xcb_connection_t * | conn | ) |
Disables RandR support by creating exactly one output with the size of the X11 screen.
Definition at line 216 of file randr.c.
References xoutput::active, DLOG, Rect::height, xoutput::name, outputs, randr_disabled, xoutput::rect, scalloc(), TAILQ_INSERT_TAIL, Rect::width, Rect::x, and Rect::y.
Referenced by initialize_randr(), initialize_xinerama(), and randr_query_outputs().
Output* get_first_output | ( | ) |
Returns the first output which is active.
Definition at line 84 of file randr.c.
References xoutput::active, outputs, and TAILQ_FOREACH.
Referenced by main(), and randr_query_outputs().
Output* get_output_by_name | ( | const char * | name | ) |
Returns the output with the given name if it is active (!) or NULL.
Definition at line 70 of file randr.c.
References xoutput::active, xoutput::name, outputs, and TAILQ_FOREACH.
Referenced by get_first_workspace_for_output(), initialize_output(), and workspace_initialize().
Output* get_output_containing | ( | int | x, | |
int | y | |||
) |
Returns the active (!) output which contains the coordinates x, y or NULL if there is no output which contains these coordinates.
Definition at line 99 of file randr.c.
References xoutput::active, DLOG, Rect::height, outputs, xoutput::rect, TAILQ_FOREACH, Rect::width, Rect::x, and Rect::y.
Referenced by check_crossing_screen_boundary(), focus_thing(), main(), reparent_window(), reposition_client(), and resize_graphical_handler().
Output* get_output_most | ( | direction_t | direction, | |
Output * | current | |||
) |
Gets the output which is the last one in the given direction, for example the output on the most bottom when direction == D_DOWN, the output most right when direction == D_RIGHT and so on.
This function always returns a output.
Definition at line 122 of file randr.c.
References xoutput::active, D_DOWN, D_LEFT, D_RIGHT, D_UP, outputs, xoutput::rect, TAILQ_FOREACH, WIN, Rect::x, and Rect::y.
Referenced by focus_thing(), and resize_graphical_handler().
Initializes the specified output, assigning the specified workspace to it.
Definition at line 166 of file randr.c.
References xoutput::bar, xoutput::bargc, config, create_window(), xoutput::current_workspace, Config::disable_workspace_bar, DLOG, Config::font, get_output_by_name(), Font::height, Rect::height, ipc_send_event(), load_font(), Workspace::num, Workspace::output, Workspace::preferred_output, xoutput::rect, Workspace::rect, SLIST_INIT, TAILQ_FOREACH, Rect::width, workspace_assign_to(), workspace_map_clients(), workspaces, Rect::x, XCB_CURSOR_LEFT_PTR, and Rect::y.
Referenced by init_workspaces(), initialize_xinerama(), and randr_query_outputs().
void initialize_randr | ( | xcb_connection_t * | conn, | |
int * | event_base | |||
) |
We have just established a connection to the X server and need the initial XRandR information to setup workspaces for each screen.
Definition at line 522 of file randr.c.
References disable_randr(), randr_query_outputs(), and root.
Referenced by main().
void randr_query_outputs | ( | xcb_connection_t * | conn | ) |
(Re-)queries the outputs via RandR and stores them in the list of outputs.
Definition at line 387 of file randr.c.
References xoutput::active, xoutput::changed, xoutput::current_workspace, die, disable_randr(), DLOG, ELOG, ewmh_update_workarea(), get_first_output(), handle_output(), height, Rect::height, init_workspaces(), initialize_output(), min(), xoutput::name, Workspace::output, output_change_mode(), outputs, randr_disabled, xoutput::rect, root, SLIST_EMPTY, SLIST_FIRST, SLIST_INSERT_HEAD, SLIST_REMOVE_HEAD, TAILQ_EMPTY, TAILQ_END, TAILQ_FOREACH, TAILQ_NEXT, xoutput::to_be_disabled, update_if_necessary(), width, Rect::width, workspace_assign_to(), workspaces, Rect::x, and Rect::y.
Referenced by handle_screen_change(), and initialize_randr().
TAILQ_HEAD | ( | outputs_head | , | |
xoutput | ||||
) |
struct outputs_head outputs |
Definition at line 47 of file randr.c.
Referenced by button_press_bar(), client_enter_fullscreen(), disable_randr(), get_first_output(), get_output_by_id(), get_output_by_name(), get_output_containing(), get_output_most(), get_screen_at(), handle_expose_event(), handle_output(), handle_signal(), init_workspaces(), initialize_xinerama(), IPC_HANDLER(), query_screens(), randr_query_outputs(), and render_layout().