22 if (output->
rect.
x == x && output->
rect.
y == y)
37 const char *walk = output_spec;
40 while (sscanf(walk,
"%ux%u+%u+%u%n", &width, &height, &x, &y, &chars_consumed) == 4) {
41 walk += chars_consumed;
49 DLOG(
"Parsed output as width = %u, height = %u at (%u, %u)%s\n",
50 width, height, x, y, primary ?
" (primary)" :
"");
53 if (new_output != NULL) {
54 DLOG(
"Re-used old output %p\n", new_output);
72 if (new_output->
rect.
x == 0 && new_output->
rect.
y == 0)
84 ELOG(
"No screens found. Please fix your setup. i3 will exit now.\n");
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_INSERT_HEAD(head, elm, field)
struct outputs_head outputs
void fake_outputs_init(const char *output_spec)
Creates outputs according to the given specification.
#define TAILQ_INSERT_TAIL(head, elm, field)
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 leas...
void output_init_con(Output *output)
Initializes a CT_OUTPUT Con (searches existing ones from inplace restart before) to use for the given...
#define TAILQ_FOREACH(var, head, field)
Con * output_get_content(Con *output)
Returns the output container below the given output container.
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...
#define SLIST_INSERT_HEAD(head, elm, field)
An Output is a physical output on your graphics driver.
Con * con
Pointer to the Con which represents this output.
static Output * get_screen_at(unsigned int x, unsigned int y)
names_head
List of names for the output.
Rect rect
x, y, width, height
char * output_primary_name(Output *output)
Retrieves the primary name of an output.
bool active
Whether the output is currently active (has a CRTC attached with a valid mode)
xcb_randr_get_output_primary_reply_t * primary