|
i3
|

Go to the source code of this file.
Functions | |
| static Output * | get_output_by_id (xcb_randr_output_t id) |
| Output * | get_output_by_name (const char *name, const bool require_active) |
| Returns the output with the given name or NULL. More... | |
| Output * | get_first_output (void) |
| Returns the first output which is active. More... | |
| static bool | any_randr_output_active (void) |
| Output * | get_output_containing (unsigned int x, unsigned int y) |
| Returns the active (!) output which contains the coordinates x, y or NULL if there is no output which contains these coordinates. More... | |
| Output * | get_output_with_dimensions (Rect rect) |
| Returns the active output which spans exactly the area specified by rect or NULL if there is no output like this. More... | |
| bool | contained_by_output (Rect rect) |
| Output * | get_output_next_wrap (direction_t direction, Output *current) |
| Like get_output_next with close_far == CLOSEST_OUTPUT, but wraps. More... | |
| Output * | get_output_next (direction_t direction, Output *current, output_close_far_t close_far) |
| Gets the output which is the next one in the given direction. More... | |
| Output * | create_root_output (xcb_connection_t *conn) |
| void | output_init_con (Output *output) |
| Initializes a CT_OUTPUT Con (searches existing ones from inplace restart before) to use for the given Output. More... | |
| void | init_ws_for_output (Output *output, Con *content) |
| Initializes at least one workspace for this output, trying the following steps until there is at least one workspace: More... | |
| static void | output_change_mode (xcb_connection_t *conn, Output *output) |
| static bool | randr_query_outputs_15 (void) |
| static void | handle_output (xcb_connection_t *conn, xcb_randr_output_t id, xcb_randr_get_output_info_reply_t *output, xcb_timestamp_t cts, xcb_randr_get_screen_resources_current_reply_t *res) |
| static void | randr_query_outputs_14 (void) |
| void | randr_query_outputs (void) |
| Initializes the specified output, assigning the specified workspace to it. More... | |
| void | randr_disable_output (Output *output) |
| Disables the output and moves its content. More... | |
| static void | fallback_to_root_output (void) |
| void | randr_init (int *event_base, const bool disable_randr15) |
| We have just established a connection to the X server and need the initial XRandR information to setup workspaces for each screen. More... | |
Variables | |
| xcb_randr_get_output_primary_reply_t * | primary |
| struct outputs_head | outputs = TAILQ_HEAD_INITIALIZER(outputs) |
| static Output * | root_output |
| static bool | has_randr_1_5 = false |
|
static |
Definition at line 86 of file randr.c.
References xoutput::active, outputs, TAILQ_FOREACH, and xoutput::to_be_disabled.
Referenced by randr_query_outputs().
| bool contained_by_output | ( | Rect | rect | ) |
Definition at line 146 of file randr.c.
References xoutput::active, DLOG, Rect::height, outputs, xoutput::rect, TAILQ_FOREACH, Rect::width, Rect::x, and Rect::y.
Referenced by floating_reposition().
| Output* create_root_output | ( | xcb_connection_t * | conn | ) |
Definition at line 269 of file randr.c.
References xoutput::active, Rect::height, output_name::name, output_name::names, xoutput::names_head, xoutput::rect, root_screen, scalloc(), SLIST_INIT, SLIST_INSERT_HEAD, Rect::width, Rect::x, and Rect::y.
Referenced by randr_init(), and use_root_output().

|
static |
Definition at line 1026 of file randr.c.
References xoutput::active, xoutput::con, init_ws_for_output(), output_get_content(), and output_init_con().
Referenced by randr_init().

| Output* get_first_output | ( | void | ) |
Returns the first output which is active.
Definition at line 72 of file randr.c.
References xoutput::active, die, outputs, and TAILQ_FOREACH.
Referenced by main(), and randr_disable_output().
|
static |
Definition at line 33 of file randr.c.
References xoutput::id, outputs, and TAILQ_FOREACH.
Referenced by handle_output().
| Output* get_output_by_name | ( | const char * | name, |
| const bool | require_active | ||
| ) |
Returns the output with the given name or NULL.
If require_active is true, only active outputs are considered.
Definition at line 47 of file randr.c.
References xoutput::active, output_name::name, output_name::names, xoutput::names_head, outputs, xoutput::primary, SLIST_FOREACH, and TAILQ_FOREACH.
Referenced by canonicalize_output_name(), get_output_for_con(), get_output_from_string(), init_ws_for_output(), and randr_query_outputs_15().
| Output* get_output_containing | ( | unsigned int | x, |
| unsigned 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 102 of file randr.c.
References xoutput::active, DLOG, Rect::height, outputs, xoutput::rect, TAILQ_FOREACH, Rect::width, Rect::x, and Rect::y.
Referenced by _tree_next(), check_crossing_screen_boundary(), floating_enable(), floating_maybe_reassign_ws(), floating_move_to_pointer(), handle_configure_request(), main(), manage_window(), and x_push_changes().
| Output* get_output_next | ( | direction_t | direction, |
| Output * | current, | ||
| output_close_far_t | close_far | ||
| ) |
Gets the output which is the next one in the given direction.
If close_far == CLOSEST_OUTPUT, then the output next to the current one will selected. If close_far == FARTHEST_OUTPUT, the output which is the last one in the given direction will be selected.
NULL will be returned when no active outputs are present in the direction specified (note that ‘current’ counts as such an output).
Definition at line 204 of file randr.c.
References xoutput::active, CLOSEST_OUTPUT, D_DOWN, D_LEFT, D_RIGHT, D_UP, DLOG, Rect::height, output_primary_name(), outputs, xoutput::rect, TAILQ_FOREACH, Rect::width, Rect::x, and Rect::y.
Referenced by _tree_next(), get_output_next_wrap(), and move_to_output_directed().

| Output* get_output_next_wrap | ( | direction_t | direction, |
| Output * | current | ||
| ) |
Like get_output_next with close_far == CLOSEST_OUTPUT, but wraps.
For example if get_output_next(D_DOWN, x, FARTHEST_OUTPUT) = NULL, then get_output_next_wrap(D_DOWN, x) will return the topmost output.
This function always returns a output: if no active outputs can be found, current itself is returned.
Definition at line 172 of file randr.c.
References CLOSEST_OUTPUT, D_DOWN, D_LEFT, D_RIGHT, D_UP, DLOG, FARTHEST_OUTPUT, get_output_next(), and output_primary_name().
Referenced by get_output_from_string().

Returns the active output which spans exactly the area specified by rect or NULL if there is no output like this.
Definition at line 122 of file randr.c.
References xoutput::active, DLOG, Rect::height, outputs, xoutput::rect, TAILQ_FOREACH, Rect::width, Rect::x, and Rect::y.
Referenced by manage_window().
|
static |
Definition at line 688 of file randr.c.
References DLOG, FREE, get_output_by_id(), output_name::name, output_name::names, output_primary_name(), outputs, primary, sasprintf(), scalloc(), SLIST_EMPTY, SLIST_FIRST, SLIST_INIT, SLIST_INSERT_HEAD, SLIST_REMOVE_HEAD, TAILQ_INSERT_HEAD, TAILQ_INSERT_TAIL, and update_if_necessary().
Referenced by randr_query_outputs_14().

Initializes at least one workspace for this output, trying the following steps until there is at least one workspace:
• Move existing workspaces, which are assigned to be on the given output, to the output. • Create the first assigned workspace for this output. • Create the first unused workspace.
Definition at line 399 of file randr.c.
References CF_OUTPUT, xoutput::con, con_attach(), con_detach(), con_focus(), con_get_output(), create_workspace_on_output(), croot, DLOG, floating_fix_coordinates(), Con::floating_head, focused, Con::fullscreen_mode, get_output_by_name(), GREP_FIRST, init_ws_for_output(), LOG, Workspace_Assignment::name, Con::name, Con::nodes_head, Workspace_Assignment::output, output_get_content(), output_primary_name(), Con::rect, render_con(), TAILQ_EMPTY, TAILQ_FIRST, TAILQ_FOREACH, TAILQ_NEXT, workspace_is_visible(), workspace_show(), workspace_show_by_name(), and ws_assignments.
Referenced by fake_outputs_init(), fallback_to_root_output(), init_ws_for_output(), query_screens(), randr_query_outputs(), and use_root_output().

|
static |
Definition at line 513 of file randr.c.
References xoutput::con, con_num_children(), config, Config::default_orientation, DLOG, floating_fix_coordinates(), Con::floating_head, Rect::height, L_SPLITH, L_SPLITV, Con::layout, Con::name, NO_ORIENTATION, Con::nodes_head, Con::num, output_get_content(), xoutput::rect, Con::rect, TAILQ_FIRST, TAILQ_FOREACH, and Rect::width.
Referenced by randr_query_outputs().

| void output_init_con | ( | Output * | output | ) |
Initializes a CT_OUTPUT Con (searches existing ones from inplace restart before) to use for the given Output.
Definition at line 291 of file randr.c.
References xoutput::con, con_attach(), con_fix_percent(), con_new(), croot, DLOG, Match::dock, Con::focus_head, focused, FREE, Match::insert_where, L_DOCKAREA, L_OUTPUT, L_SPLITH, Con::layout, match_init(), output_name::name, Con::name, Con::nodes_head, output_primary_name(), xoutput::rect, Con::rect, sasprintf(), scalloc(), sstrdup(), Con::swallow_head, TAILQ_FOREACH, TAILQ_INSERT_HEAD, TAILQ_INSERT_TAIL, TAILQ_REMOVE, Con::type, and x_set_name().
Referenced by fake_outputs_init(), fallback_to_root_output(), main(), query_screens(), randr_query_outputs(), and use_root_output().

| void randr_disable_output | ( | Output * | output | ) |
Disables the output and moves its content.
Definition at line 940 of file randr.c.
References xoutput::active, xoutput::changed, xoutput::con, con_attach(), con_detach(), con_focus(), con_for_window(), con_get_workspace(), croot, DLOG, DONT_KILL_WINDOW, floating_fix_coordinates(), Con::floating_head, Con::focus_head, focused, get_first_output(), Con::name, Con::nodes_head, output_get_content(), output_primary_name(), Con::rect, TAILQ_EMPTY, TAILQ_FIRST, TAILQ_FOREACH, xoutput::to_be_disabled, tree_close_internal(), Con::type, Con::window, and workspace_show().
Referenced by main(), and randr_query_outputs().

| void randr_init | ( | int * | event_base, |
| const bool | disable_randr15 | ||
| ) |
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 1037 of file randr.c.
References conn, create_root_output(), DLOG, ELOG, fallback_to_root_output(), has_randr_1_5, outputs, randr_query_outputs(), root, and TAILQ_INSERT_TAIL.
Referenced by main().

| void randr_query_outputs | ( | void | ) |
Initializes the specified output, assigning the specified workspace to it.
(Re-)queries the outputs via RandR and stores them in the list of outputs.
Definition at line 829 of file randr.c.
References xoutput::active, any_randr_output_active(), xoutput::changed, xoutput::con, con_descend_focused(), con_focus(), conn, DLOG, FREE, height, Rect::height, init_ws_for_output(), min(), Con::nodes_head, output_change_mode(), output_get_content(), output_init_con(), output_primary_name(), outputs, primary, xoutput::primary, randr_disable_output(), randr_query_outputs_14(), randr_query_outputs_15(), xoutput::rect, TAILQ_EMPTY, TAILQ_END, TAILQ_FOREACH, TAILQ_NEXT, xoutput::to_be_disabled, tree_render(), update_if_necessary(), width, Rect::width, Rect::x, and Rect::y.
Referenced by handle_configure_notify(), handle_screen_change(), and randr_init().

|
static |
Definition at line 774 of file randr.c.
References conn, DLOG, ELOG, FREE, handle_output(), primary, and root.
Referenced by randr_query_outputs().

|
static |
Definition at line 556 of file randr.c.
References conn, DLOG, ELOG, FREE, get_output_by_name(), has_randr_1_5, Workspace_Assignment::name, output_name::name, output_name::names, Workspace_Assignment::output, outputs, root, sasprintf(), scalloc(), SLIST_INIT, SLIST_INSERT_HEAD, sstrdup(), TAILQ_FOREACH, TAILQ_INSERT_HEAD, TAILQ_INSERT_TAIL, xoutput::to_be_disabled, and update_if_necessary().
Referenced by randr_query_outputs().

|
static |
Definition at line 25 of file randr.c.
Referenced by randr_init(), and randr_query_outputs_15().
| struct outputs_head outputs = TAILQ_HEAD_INITIALIZER(outputs) |
Definition at line 21 of file randr.c.
Referenced by any_randr_output_active(), contained_by_output(), fake_outputs_init(), get_first_output(), get_output_by_id(), get_output_by_name(), get_output_containing(), get_output_next(), get_output_with_dimensions(), get_screen_at(), handle_output(), IPC_HANDLER(), main(), query_screens(), randr_init(), randr_query_outputs(), randr_query_outputs_15(), sighandler_create_dialogs(), total_outputs_dimensions(), and use_root_output().
| xcb_randr_get_output_primary_reply_t* primary |
Definition at line 18 of file randr.c.
Referenced by fake_outputs_init(), handle_output(), randr_query_outputs(), and randr_query_outputs_14().
1.8.13