randr: use root window in case of no randr outputs
This patch introduces a root output covering the root window. It is used in two cases: 1. RandR is not available. In this case, the previous behaviour of creating a single output covering the root window is preserved. 2. RandR is available, but there is no active output. In this case, the root output is enabled and will be the only active output. If any RandR output becomes available, the root output will be disabled again. Existing mechanisms for migrating workspaces will just work without modification. I've carefully slipped in a global variable `Output root_output` representing that output. Fixes #926 and #1489
This commit is contained in:
@ -29,13 +29,6 @@ typedef enum {
|
||||
*/
|
||||
void randr_init(int *event_base);
|
||||
|
||||
/**
|
||||
* Disables RandR support by creating exactly one output with the size of the
|
||||
* X11 screen.
|
||||
*
|
||||
*/
|
||||
void disable_randr(xcb_connection_t *conn);
|
||||
|
||||
/**
|
||||
* Initializes a CT_OUTPUT Con (searches existing ones from inplace restart
|
||||
* before) to use for the given Output.
|
||||
@ -120,3 +113,9 @@ Output *get_output_next(direction_t direction, Output *current, output_close_far
|
||||
*
|
||||
*/
|
||||
Output *get_output_next_wrap(direction_t direction, Output *current);
|
||||
|
||||
/*
|
||||
* Creates an output covering the root window.
|
||||
*
|
||||
*/
|
||||
void create_root_output(xcb_connection_t *conn);
|
||||
|
Reference in New Issue
Block a user