aboutsummaryrefslogtreecommitdiff
path: root/backend/drm
diff options
context:
space:
mode:
authorSimon Ser <contact@emersion.fr>2021-12-09 15:43:19 +0100
committerSimon Ser <contact@emersion.fr>2021-12-09 15:46:46 +0100
commit36a2b19485ad299ee0039eb97c0f688d68205539 (patch)
tree73e9cd16a35925282fc41e1221c802d5175600be /backend/drm
parent1fbd13ec799c472558aef37436367f0e947f7d89 (diff)
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.
Diffstat (limited to 'backend/drm')
-rw-r--r--backend/drm/drm.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/backend/drm/drm.c b/backend/drm/drm.c
index d7c53231..1a46b495 100644
--- a/backend/drm/drm.c
+++ b/backend/drm/drm.c
@@ -1299,8 +1299,7 @@ void scan_drm_connectors(struct wlr_drm_backend *drm,
wlr_output_init(&wlr_conn->output, &drm->backend, &output_impl,
drm->display);
- memcpy(wlr_conn->output.name, wlr_conn->name,
- sizeof(wlr_conn->output.name));
+ wlr_output_set_name(&wlr_conn->output, wlr_conn->name);
wlr_conn->output.phys_width = drm_conn->mmWidth;
wlr_conn->output.phys_height = drm_conn->mmHeight;