39 const char *walk = output_spec;
40 unsigned int x,
y, width, height;
42 while (sscanf(walk,
"%ux%u+%u+%u%n", &width, &height, &x, &
y, &chars_consumed) == 4) {
43 walk += chars_consumed;
52 DLOG(
"Parsed output as width = %u, height = %u at (%u, %u)%s\n",
53 width, height, x,
y,
primary ?
" (primary)" :
"");
56 if (new_output != NULL) {
57 DLOG(
"Re-used old output %p\n", new_output);
70 new_output->
rect.
x = x;
75 if (new_output->
rect.
x == 0 && new_output->
rect.
y == 0) {
88 ELOG(
"No screens found. Please fix your setup. i3 will exit now.\n");
static Output * get_screen_at(unsigned int x, unsigned int y)
void fake_outputs_init(const char *output_spec)
Creates outputs according to the given specification.
char * output_primary_name(Output *output)
Retrieves the primary name of an output.
void init_ws_for_output(Output *output)
Initializes at least one workspace for this output, trying the following steps until there is at leas...
void output_init_con(Output *output)
Initializes a CT_OUTPUT Con (searches existing ones from inplace restart before) to use for the given...
struct outputs_head outputs
xcb_randr_get_output_primary_reply_t * primary
void * scalloc(size_t num, size_t size)
Safe-wrapper around calloc which exits if malloc returns NULL (meaning that there is no more memory a...
int sasprintf(char **strp, const char *fmt,...)
Safe-wrapper around asprintf which exits if it returns -1 (meaning that there is no more memory avail...
#define TAILQ_FOREACH(var, head, field)
#define SLIST_INSERT_HEAD(head, elm, field)
#define TAILQ_INSERT_TAIL(head, elm, field)
#define TAILQ_INSERT_HEAD(head, elm, field)
An Output is a physical output on your graphics driver.
bool active
Whether the output is currently active (has a CRTC attached with a valid mode)
Rect rect
x, y, width, height