x11: add --x11-bypass-compositor=always

Also add missing documentation for fs-only, and correct the default.
This commit is contained in:
wm4 2016-05-06 19:57:17 +02:00
parent 7c5188c27e
commit 55846641ea
3 changed files with 9 additions and 3 deletions

View File

@ -2085,9 +2085,14 @@ Window
This option might be removed in the future.
``--x11-bypass-compositor=<yes|no>``
``--x11-bypass-compositor=<yes|no|fs-only|always>``
If set to ``yes``, then ask the compositor to unredirect the mpv window
(default: no). This uses the ``_NET_WM_BYPASS_COMPOSITOR`` hint.
(default: ``fs-only``). This uses the ``_NET_WM_BYPASS_COMPOSITOR`` hint.
``fs-only`` asks the window manager to disable the compositor only in
fullscreen mode,
``always`` asks the window manager to always enable the compositor.
Disc Devices

View File

@ -461,7 +461,7 @@ const m_option_t mp_opts[] = {
OPT_CHOICE("x11-netwm", vo.x11_netwm, 0,
({"auto", 0}, {"no", -1}, {"yes", 1})),
OPT_CHOICE("x11-bypass-compositor", vo.x11_bypass_compositor, 0,
({"no", 0}, {"yes", 1}, {"fs-only", 2})),
({"no", 0}, {"yes", 1}, {"fs-only", 2}, {"always", 3})),
#endif
#if HAVE_WIN32
OPT_STRING("vo-mmcss-profile", vo.mmcss_profile, M_OPT_FIXED),

View File

@ -959,6 +959,7 @@ static void vo_x11_update_composition_hint(struct vo *vo)
case 0: hint = 0; break; // leave default
case 1: hint = 1; break; // always bypass
case 2: hint = x11->fs ? 1 : 0; break; // bypass in FS
case 3: hint = 2; break; // always enable
}
XChangeProperty(x11->display, x11->window, XA(x11,_NET_WM_BYPASS_COMPOSITOR),