diff options
author | wm4 <wm4@nowhere> | 2013-08-11 23:57:00 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2013-08-11 23:59:18 +0200 |
commit | cdf4b7d2ee666a2b4635bd9eacce7e1a414dd7c2 (patch) | |
tree | 4ad4fb71eb5af31acd2b6cbe1d1abfc76097e299 /video/out/x11_common.c | |
parent | e978511d63ec35182e4e11825836552b7a8e7159 (diff) | |
download | mpv-cdf4b7d2ee666a2b4635bd9eacce7e1a414dd7c2.tar.bz2 mpv-cdf4b7d2ee666a2b4635bd9eacce7e1a414dd7c2.tar.xz |
x11_common: get hack for Motif Window Manager out of the way
Disable the hack by default, because it's interfering with some more
modern WMs. MWM (Motif Window Manager) is probably pretty dead, but
we still allow enabling the old hack with "--fstype=mwm_hack".
See github issue #179.
Diffstat (limited to 'video/out/x11_common.c')
-rw-r--r-- | video/out/x11_common.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/video/out/x11_common.c b/video/out/x11_common.c index 2e28b8c423..5b1bb9a7aa 100644 --- a/video/out/x11_common.c +++ b/video/out/x11_common.c @@ -74,6 +74,7 @@ #define vo_wm_STAYS_ON_TOP 4 #define vo_wm_ABOVE 8 #define vo_wm_BELOW 16 +#define vo_wm_MWM 32 #define vo_wm_NETWM (vo_wm_FULLSCREEN | vo_wm_STAYS_ON_TOP | vo_wm_ABOVE | \ vo_wm_BELOW) @@ -252,6 +253,8 @@ void fstype_help(void) "use _NETWM_STATE_FULLSCREEN hint if available"); mp_msg(MSGT_VO, MSGL_INFO, " %-15s %s\n", "stays_on_top", "use _NETWM_STATE_STAYS_ON_TOP hint if available"); + mp_msg(MSGT_VO, MSGL_INFO, " %-15s %s\n", "mwm_hack", + "enable MWM hack"); mp_msg(MSGT_VO, MSGL_INFO, "You can also negate the settings with simply putting '-' in the beginning"); mp_msg(MSGT_VO, MSGL_INFO, "\n"); @@ -271,6 +274,8 @@ static void fstype_dump(int fstype) mp_msg(MSGT_VO, MSGL_V, " ABOVE"); if (fstype & vo_wm_BELOW) mp_msg(MSGT_VO, MSGL_V, " BELOW"); + if (fstype & vo_wm_MWM) + mp_msg(MSGT_VO, MSGL_V, " mwm_hack"); mp_msg(MSGT_VO, MSGL_V, " X atoms\n"); } else { mp_msg(MSGT_VO, MSGL_V, @@ -1235,6 +1240,11 @@ static int vo_x11_get_fs_type(struct vo *vo) type &= ~vo_wm_NETWM; else type |= vo_wm_NETWM; + } else if (!strcmp(arg, "mwm_hack")) { + if (neg) + type &= ~vo_wm_MWM; + else + type |= vo_wm_MWM; } else if (!strcmp(arg, "none")) type = 0; // clear; keep parsing } @@ -1336,7 +1346,7 @@ static void vo_x11_fullscreen(struct vo *vo) else x11->old_gravity = x11->vo_hint.win_gravity; } - if (x11->wm_type == 0 && !(vo->opts->fsmode & 16)) { + if (x11->fs_type & vo_wm_MWM) { XUnmapWindow(x11->display, x11->window); // required for MWM XWithdrawWindow(x11->display, x11->window, x11->screen); x11->fs_flip = 1; |