From d27c85b0a10b9f337db22ec426d9f7c4af0f60dc Mon Sep 17 00:00:00 2001 From: Dudemanguy Date: Fri, 13 May 2022 13:48:46 -0500 Subject: wayland: use wl_output v4 for display-names 5774ce759a6c7fe0727cfbd4458957abfd96a7b7 added the new output name event and used them for the --fs-screen-name option. It turns out that the display-names property could also make use of these names, so go ahead and use output->name in this case if we have them. If not, fallback to output->model like before. --- video/out/wayland_common.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/video/out/wayland_common.c b/video/out/wayland_common.c index 3f85b3d5e5..cd97c77bf6 100644 --- a/video/out/wayland_common.c +++ b/video/out/wayland_common.c @@ -1244,9 +1244,11 @@ static char **get_displays_spanned(struct vo_wayland_state *wl) int displays_spanned = 0; struct vo_wayland_output *output; wl_list_for_each(output, &wl->output_list, link) { - if (output->has_surface) + if (output->has_surface) { + char *name = output->name ? output->name : output->model; MP_TARRAY_APPEND(NULL, names, displays_spanned, - talloc_strdup(NULL, output->model)); + talloc_strdup(NULL, name)); + } } MP_TARRAY_APPEND(NULL, names, displays_spanned, NULL); return names; -- cgit v1.2.3