wayland: use wl_output v4 for display-names

5774ce759a 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.
This commit is contained in:
Dudemanguy 2022-05-13 13:48:46 -05:00
parent e686297ecf
commit d27c85b0a1
1 changed files with 4 additions and 2 deletions

View File

@ -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;