aboutsummaryrefslogtreecommitdiff
path: root/backend/drm/drm.c
diff options
context:
space:
mode:
Diffstat (limited to 'backend/drm/drm.c')
-rw-r--r--backend/drm/drm.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/backend/drm/drm.c b/backend/drm/drm.c
index 3a4a683f..cca0a8d4 100644
--- a/backend/drm/drm.c
+++ b/backend/drm/drm.c
@@ -1343,9 +1343,13 @@ void scan_drm_connectors(struct wlr_drm_backend *drm,
struct wlr_output *output = &wlr_conn->output;
char description[128];
- snprintf(description, sizeof(description), "%s %s %s (%s%s%s)",
- output->make, output->model, output->serial, output->name,
- subconnector ? " via " : "", subconnector ? subconnector : "");
+ snprintf(description, sizeof(description), "%s %s%s%s (%s%s%s)",
+ output->make, output->model,
+ output->serial ? " " : "",
+ output->serial ? output->serial : "",
+ output->name,
+ subconnector ? " via " : "",
+ subconnector ? subconnector : "");
wlr_output_set_description(output, description);
free(subconnector);