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.
This commit is contained in:
Dudemanguy 2021-06-26 17:19:45 -05:00
parent 488581912d
commit a1c6762156
3 changed files with 2 additions and 6 deletions

View File

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

View File

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

View File

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