mirror of https://github.com/mpv-player/mpv
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:
parent
488581912d
commit
a1c6762156
|
@ -5446,8 +5446,7 @@ The following video options are currently all specific to ``--vo=gpu`` and
|
||||||
Currently only relevant for ``--gpu-api=d3d11``.
|
Currently only relevant for ``--gpu-api=d3d11``.
|
||||||
|
|
||||||
``--wayland-app-id=<string>``
|
``--wayland-app-id=<string>``
|
||||||
Set the client app id for Wayland-based video output methods. By default, "mpv"
|
Set the client app id for Wayland-based video output methods (default: ``mpv``).
|
||||||
is used.
|
|
||||||
|
|
||||||
``--wayland-disable-vsync=<yes|no>``
|
``--wayland-disable-vsync=<yes|no>``
|
||||||
Disable vsync for the wayland contexts (default: no). Useful for benchmarking
|
Disable vsync for the wayland contexts (default: no). Useful for benchmarking
|
||||||
|
|
|
@ -198,6 +198,7 @@ const struct m_sub_options vo_sub_opts = {
|
||||||
.snap_window = 0,
|
.snap_window = 0,
|
||||||
.border = 1,
|
.border = 1,
|
||||||
.fit_border = 1,
|
.fit_border = 1,
|
||||||
|
.appid = "mpv",
|
||||||
.WinID = -1,
|
.WinID = -1,
|
||||||
.window_scale = 1.0,
|
.window_scale = 1.0,
|
||||||
.x11_bypass_compositor = 2,
|
.x11_bypass_compositor = 2,
|
||||||
|
|
|
@ -1480,10 +1480,6 @@ static void update_app_id(struct vo_wayland_state *wl)
|
||||||
{
|
{
|
||||||
if (!wl->xdg_toplevel)
|
if (!wl->xdg_toplevel)
|
||||||
return;
|
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);
|
xdg_toplevel_set_app_id(wl->xdg_toplevel, wl->vo_opts->appid);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue