2 #define I3__FILE__ "fake_outputs.c"
24 if (output->
rect.
x == x && output->
rect.
y == y)
38 char useless_buffer[1024];
39 const char *walk = output_spec;
41 while (sscanf(walk,
"%ux%u+%u+%u", &width, &height, &x, &y) == 4) {
42 DLOG(
"Parsed output as width = %u, height = %u at (%u, %u)\n",
45 if (new_output != NULL) {
46 DLOG(
"Re-used old output %p\n", new_output);
54 DLOG(
"Created new fake output %s (%p)\n", new_output->
name, new_output);
61 if (new_output->
rect.
x == 0 && new_output->
rect.
y == 0)
71 walk += sprintf(useless_buffer,
"%ux%u+%u+%u", width, height, x, y) + 1;
75 ELOG(
"No screens found. Please fix your setup. i3 will exit now.\n");
char * name
Name of the output.
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...
Rect rect
x, y, width, height
static Output * get_screen_at(unsigned int x, unsigned int y)
An Output is a physical output on your graphics driver.
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...
struct outputs_head outputs
#define TAILQ_INSERT_HEAD(head, elm, field)
Con * con
Pointer to the Con which represents this output.
void fake_outputs_init(const char *output_spec)
Creates outputs according to the given specification.
bool active
Whether the output is currently active (has a CRTC attached with a valid mode)
void * scalloc(size_t size)
Safe-wrapper around calloc which exits if malloc returns NULL (meaning that there is no more memory a...
#define TAILQ_INSERT_TAIL(head, elm, field)
Con * output_get_content(Con *output)
Returns the output container below the given output container.
#define TAILQ_FOREACH(var, head, field)
void output_init_con(Output *output)
Initializes a CT_OUTPUT Con (searches existing ones from inplace restart before) to use for the given...