Store output names as a linked list
Currently, only one name is ever added, and only the first name is ever accessed; actually using the capability to store and access multiple names comes in the following commits.
This commit is contained in:
@ -47,8 +47,11 @@ void fake_outputs_init(const char *output_spec) {
|
||||
new_output->rect.width = min(new_output->rect.width, width);
|
||||
new_output->rect.height = min(new_output->rect.height, height);
|
||||
} else {
|
||||
struct output_name *output_name = scalloc(1, sizeof(struct output_name));
|
||||
new_output = scalloc(1, sizeof(Output));
|
||||
sasprintf(&(new_output->name), "fake-%d", num_screens);
|
||||
sasprintf(&(output_name->name), "fake-%d", num_screens);
|
||||
SLIST_INIT(&(new_output->names_head));
|
||||
SLIST_INSERT_HEAD(&(new_output->names_head), output_name, names);
|
||||
DLOG("Created new fake output %s (%p)\n", output_primary_name(new_output), new_output);
|
||||
new_output->active = true;
|
||||
new_output->rect.x = x;
|
||||
|
Reference in New Issue
Block a user