output: add description

wlr_output.description is a string containing a human-readable string
identifying the output. Compositors can customise it via
wlr_output_set_description, for instance to make the name more
user-friendly.

References: https://github.com/swaywm/wlroots/issues/1623
This commit is contained in:
Simon Ser 2019-12-26 16:09:05 +01:00 committed by Brian Ashworth
parent a420d2c41e
commit 4da4a15d6b
7 changed files with 48 additions and 0 deletions

View file

@ -458,6 +458,11 @@ struct wlr_output *wlr_wl_output_create(struct wlr_backend *wlr_backend) {
snprintf(wlr_output->name, sizeof(wlr_output->name), "WL-%zd",
++backend->last_output_num);
char description[128];
snprintf(description, sizeof(description),
"Wayland output %zd", backend->last_output_num);
wlr_output_set_description(wlr_output, description);
output->backend = backend;
wl_list_init(&output->presentation_feedbacks);