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:
Vladimir Panteleev
2017-09-09 07:37:37 +00:00
committed by Michael Stapelberg
parent 1b419431cd
commit 6c0e715877
5 changed files with 44 additions and 10 deletions

View File

@ -349,6 +349,13 @@ struct Autostart {
autostarts_always;
};
struct output_name {
char *name;
SLIST_ENTRY(output_name)
names;
};
/**
* An Output is a physical output on your graphics driver. Outputs which
* are currently in use have (output->active == true). Each output has a
@ -370,8 +377,11 @@ struct xoutput {
bool to_be_disabled;
bool primary;
/** Name of the output */
char *name;
/** List of names for the output.
* An output always has at least one name; the first name is
* considered the primary one. */
SLIST_HEAD(names_head, output_name)
names_head;
/** Pointer to the Con which represents this output */
Con *con;