mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-10-29 05:40:12 -04:00
output: introduce wlr_output_set_name
wlroots picks names for all outputs, but it might be desirable for compositor to override it. For instance, Sway will use a headless output as a fallback in case no outputs are connected. Sway wants to clearly label the fallback output as such and label "real" headless outputs starting from HEADLESS-1.
This commit is contained in:
parent
1fbd13ec79
commit
36a2b19485
6 changed files with 33 additions and 9 deletions
|
|
@ -520,8 +520,10 @@ struct wlr_output *wlr_wl_output_create(struct wlr_backend *wlr_backend) {
|
|||
wlr_output_update_custom_mode(wlr_output, 1280, 720, 0);
|
||||
strncpy(wlr_output->make, "wayland", sizeof(wlr_output->make));
|
||||
strncpy(wlr_output->model, "wayland", sizeof(wlr_output->model));
|
||||
snprintf(wlr_output->name, sizeof(wlr_output->name), "WL-%zd",
|
||||
++backend->last_output_num);
|
||||
|
||||
char name[64];
|
||||
snprintf(name, sizeof(name), "WL-%zd", ++backend->last_output_num);
|
||||
wlr_output_set_name(wlr_output, name);
|
||||
|
||||
char description[128];
|
||||
snprintf(description, sizeof(description),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue