mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-11-02 09:01:38 -05:00
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:
parent
a420d2c41e
commit
4da4a15d6b
7 changed files with 48 additions and 0 deletions
|
|
@ -1348,6 +1348,12 @@ void scan_drm_connectors(struct wlr_drm_backend *drm) {
|
|||
parse_edid(&wlr_conn->output, edid_len, edid);
|
||||
free(edid);
|
||||
|
||||
struct wlr_output *output = &wlr_conn->output;
|
||||
char description[128];
|
||||
snprintf(description, sizeof(description), "%s %s %s (%s)",
|
||||
output->make, output->model, output->serial, output->name);
|
||||
wlr_output_set_description(output, description);
|
||||
|
||||
wlr_log(WLR_INFO, "Detected modes:");
|
||||
|
||||
for (int i = 0; i < drm_conn->count_modes; ++i) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue