diff options
author | Dudemanguy <random342@airmail.cc> | 2022-05-13 13:48:46 -0500 |
---|---|---|
committer | Dudemanguy <random342@airmail.cc> | 2022-05-13 14:12:49 -0500 |
commit | d27c85b0a10b9f337db22ec426d9f7c4af0f60dc (patch) | |
tree | d506c462cb0b60fddfe1dec71ca7ad1e201af05c /video/out | |
parent | e686297ecf3928b768c674bb10faa6f352b999b8 (diff) | |
download | mpv-d27c85b0a10b9f337db22ec426d9f7c4af0f60dc.tar.bz2 mpv-d27c85b0a10b9f337db22ec426d9f7c4af0f60dc.tar.xz |
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.
Diffstat (limited to 'video/out')
-rw-r--r-- | video/out/wayland_common.c | 6 |
1 files 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; |