From 4da4a15d6bfa8d4b92d1ac4605ea78893da3fab0 Mon Sep 17 00:00:00 2001 From: Simon Ser Date: Thu, 26 Dec 2019 16:09:05 +0100 Subject: 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 --- backend/headless/output.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'backend/headless') diff --git a/backend/headless/output.c b/backend/headless/output.c index 992a4883..add00f76 100644 --- a/backend/headless/output.c +++ b/backend/headless/output.c @@ -121,6 +121,11 @@ struct wlr_output *wlr_headless_add_output(struct wlr_backend *wlr_backend, snprintf(wlr_output->name, sizeof(wlr_output->name), "HEADLESS-%zd", ++backend->last_output_num); + char description[128]; + snprintf(description, sizeof(description), + "Headless output %zd", backend->last_output_num); + wlr_output_set_description(wlr_output, description); + if (!wlr_egl_make_current(&output->backend->egl, output->egl_surface, NULL)) { goto error; -- cgit v1.2.3