- s = scalloc(sizeof(Output));
- sasprintf(&(s->name), "xinerama-%d", num_screens);
- DLOG("Created new Xinerama screen %s (%p)\n", s->name, s);
+ s = scalloc(1, sizeof(Output));
+ struct output_name *output_name = scalloc(1, sizeof(struct output_name));
+ sasprintf(&output_name->name, "xinerama-%d", num_screens);
+ SLIST_INIT(&s->names_head);
+ SLIST_INSERT_HEAD(&s->names_head, output_name, names);
+ DLOG("Created new Xinerama screen %s (%p)\n", output_primary_name(s), s);