summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDudemanguy <random342@airmail.cc>2021-06-26 17:19:45 -0500
committerDudemanguy <random342@airmail.cc>2021-06-26 17:28:01 -0500
commita1c6762156a2e4f2f8c538a56bf2f8bbb0417b2b (patch)
treec5ffd87b41e97663d9df6e47717876fafc9563b9
parent488581912d01a982f226162eef19ad8aec0c8ead (diff)
downloadmpv-a1c6762156a2e4f2f8c538a56bf2f8bbb0417b2b.tar.bz2
mpv-a1c6762156a2e4f2f8c538a56bf2f8bbb0417b2b.tar.xz
wayland: handle app id option less stupidly
Not sure what I was on when I wrote this. wayland-app-id is supposed to default to "mpv". Just set that in the vo_sub_opts and don't do this weird m_config_cache_write_opt thing. Also make the doc entry nicer.
-rw-r--r--DOCS/man/options.rst3
-rw-r--r--options/options.c1
-rw-r--r--video/out/wayland_common.c4
3 files changed, 2 insertions, 6 deletions
diff --git a/DOCS/man/options.rst b/DOCS/man/options.rst
index fb111ded39..712af52db6 100644
--- a/DOCS/man/options.rst
+++ b/DOCS/man/options.rst
@@ -5446,8 +5446,7 @@ The following video options are currently all specific to ``--vo=gpu`` and
Currently only relevant for ``--gpu-api=d3d11``.
``--wayland-app-id=<string>``
- Set the client app id for Wayland-based video output methods. By default, "mpv"
- is used.
+ Set the client app id for Wayland-based video output methods (default: ``mpv``).
``--wayland-disable-vsync=<yes|no>``
Disable vsync for the wayland contexts (default: no). Useful for benchmarking
diff --git a/options/options.c b/options/options.c
index ebeff51d23..cf0eebf527 100644
--- a/options/options.c
+++ b/options/options.c
@@ -198,6 +198,7 @@ const struct m_sub_options vo_sub_opts = {
.snap_window = 0,
.border = 1,
.fit_border = 1,
+ .appid = "mpv",
.WinID = -1,
.window_scale = 1.0,
.x11_bypass_compositor = 2,
diff --git a/video/out/wayland_common.c b/video/out/wayland_common.c
index 1b7eb5246b..1cc41e648f 100644
--- a/video/out/wayland_common.c
+++ b/video/out/wayland_common.c
@@ -1480,10 +1480,6 @@ static void update_app_id(struct vo_wayland_state *wl)
{
if (!wl->xdg_toplevel)
return;
- if (!wl->vo_opts->appid) {
- wl->vo_opts->appid = talloc_strdup(wl->vo_opts, "mpv");
- m_config_cache_write_opt(wl->vo_opts_cache, &wl->vo_opts->appid);
- }
xdg_toplevel_set_app_id(wl->xdg_toplevel, wl->vo_opts->appid);
}