diff options
author | Simon Ser <contact@emersion.fr> | 2019-12-26 16:09:05 +0100 |
---|---|---|
committer | Brian Ashworth <bosrsf04@gmail.com> | 2019-12-29 12:35:22 -0500 |
commit | 4da4a15d6bfa8d4b92d1ac4605ea78893da3fab0 (patch) | |
tree | 9466504b4ac0c193c1fbd597ac1bab61f588833b /backend/x11 | |
parent | a420d2c41ef3f001afb806d13e31a2e21502d76f (diff) |
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
Diffstat (limited to 'backend/x11')
-rw-r--r-- | backend/x11/output.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/backend/x11/output.c b/backend/x11/output.c index 1307f785..b6d00852 100644 --- a/backend/x11/output.c +++ b/backend/x11/output.c @@ -149,6 +149,11 @@ struct wlr_output *wlr_x11_output_create(struct wlr_backend *backend) { ++x11->last_output_num); parse_xcb_setup(wlr_output, x11->xcb); + char description[128]; + snprintf(description, sizeof(description), + "X11 output %zd", x11->last_output_num); + wlr_output_set_description(wlr_output, description); + uint32_t mask = XCB_CW_EVENT_MASK; uint32_t values[] = { XCB_EVENT_MASK_EXPOSURE | XCB_EVENT_MASK_STRUCTURE_NOTIFY |