mirror of https://github.com/mpv-player/mpv
x11: stupid workaround for XMonad
--x11-netwm=yes now forces NetWM fullscreen, while --x11-netwm=auto (detect whether NetWM fullsctreen support is available) is the old behavior and still the default. See #888.
This commit is contained in:
parent
f679c5de1b
commit
54fd93856a
|
@ -1708,16 +1708,26 @@ Window
|
|||
``--x11-name``
|
||||
Set the window class name for X11-based video output methods.
|
||||
|
||||
``--x11-netwm=no``
|
||||
``--x11-netwm=<yes|no|auto>``
|
||||
(X11 only)
|
||||
Disable use of the NetWM protocol when switching to or from fullscreen.
|
||||
Control the use of NetWM protocol features.
|
||||
|
||||
This may or may not help with broken window managers. This provides some
|
||||
functionality that was implemented by the now removed ``--fstype`` option.
|
||||
Actually, it is not known to the developers to which degree this option
|
||||
was needed, so feedback is welcome.
|
||||
|
||||
By default, NetWM support is autodetected, and using this option forces
|
||||
autodetection to fail.
|
||||
Specifically, ``yes`` will force use of NetWM fullscreen support, even if
|
||||
not advertised by the WM. This can be useful for WMs that are broken on
|
||||
purpose, like XMonad. (XMonad supposedly doesn't advertise fullscreen
|
||||
support, because Flash uses it. Apparently, applications which want to
|
||||
use fullscreen anyway are supposed to either ignore the NetWM support hints,
|
||||
or provide a workaround. Shame on XMonad for deliberately breaking X
|
||||
protocols (as if X isn't bad enough already).
|
||||
|
||||
By default, NetWM support is autodetected (``auto``).
|
||||
|
||||
This option might be removed in the future.
|
||||
|
||||
|
||||
Disc Devices
|
||||
|
|
|
@ -431,7 +431,8 @@ const m_option_t mp_opts[] = {
|
|||
|
||||
OPT_INT64("wid", vo.WinID, CONF_GLOBAL),
|
||||
#if HAVE_X11
|
||||
OPT_FLAG("x11-netwm", vo.x11_netwm, 0),
|
||||
OPT_CHOICE("x11-netwm", vo.x11_netwm, 0,
|
||||
({"auto", 0}, {"no", -1}, {"yes", 1})),
|
||||
#endif
|
||||
OPT_STRING("heartbeat-cmd", heartbeat_cmd, 0),
|
||||
OPT_FLOAT("heartbeat-interval", heartbeat_interval, CONF_MIN, 0),
|
||||
|
@ -573,7 +574,6 @@ const struct MPOpts mp_default_opts = {
|
|||
.keepaspect = 1,
|
||||
.border = 1,
|
||||
.WinID = -1,
|
||||
.x11_netwm = 1,
|
||||
},
|
||||
.allow_win_drag = 1,
|
||||
.wintitle = "mpv - ${media-title}",
|
||||
|
|
|
@ -308,7 +308,7 @@ static int vo_wm_detect(struct vo *vo)
|
|||
&nitems);
|
||||
if (args) {
|
||||
MP_VERBOSE(x11, "Detected wm supports NetWM.\n");
|
||||
if (vo->opts->x11_netwm) {
|
||||
if (vo->opts->x11_netwm >= 0) {
|
||||
for (i = 0; i < nitems; i++)
|
||||
wm |= net_wm_support_state_test(vo->x11, args[i]);
|
||||
} else {
|
||||
|
@ -319,6 +319,10 @@ static int vo_wm_detect(struct vo *vo)
|
|||
|
||||
if (wm == 0)
|
||||
MP_VERBOSE(x11, "Unknown wm type...\n");
|
||||
if (vo->opts->x11_netwm > 0 && !(wm & vo_wm_FULLSCREEN)) {
|
||||
MP_WARN(x11, "Forcing NetWM FULLSCREEN support.\n");
|
||||
wm |= vo_wm_FULLSCREEN;
|
||||
}
|
||||
return wm;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue