summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2015-05-15 13:50:44 +0200
committerDiogo Franco (Kovensky) <diogomfranco@gmail.com>2015-05-19 11:11:38 +0900
commit8f9cb82f4f85ac3e95bc20d35340ea06c69409f1 (patch)
tree912b2a51f79bf564abaf995ac37ad54d65833771
parentb4fdb25611d9f3833b705e6fd96fdc11e7c147ed (diff)
downloadmpv-8f9cb82f4f85ac3e95bc20d35340ea06c69409f1.tar.bz2
mpv-8f9cb82f4f85ac3e95bc20d35340ea06c69409f1.tar.xz
x11: attempt to make initial fullscreening more reliable
It appears some WMs have a problem with out method of setting initial fullscreen mode. We assume that if the window's _NET_WM_STATE includes _NET_WM_STATE_FULLSCREEN before mapping the window, the WM will show it as fullscreen at mapped. EWMH doesn't say anything that this should work, although one could argue that it's implied. In any case, since it's not standard behavior without at least some doubt, it's probably a good idea to try the "old" method as well. Fortunately, it should be idempotent. See #1937, #1920. (cherry picked from commit a4f3df5970cc34d8899dbd31b3475f7bd6547f3f)
-rw-r--r--video/out/x11_common.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/video/out/x11_common.c b/video/out/x11_common.c
index aca492953f..4fa891fc85 100644
--- a/video/out/x11_common.c
+++ b/video/out/x11_common.c
@@ -1389,6 +1389,9 @@ static void vo_x11_map_window(struct vo *vo, struct mp_rect rc)
vo_x11_selectinput_witherr(vo, x11->display, x11->window, events);
XMapWindow(x11->display, x11->window);
+ if (vo->opts->fullscreen && (x11->wm_type & vo_wm_FULLSCREEN))
+ x11_set_ewmh_state(x11, "_NET_WM_STATE_FULLSCREEN", 1);
+
vo_x11_xembed_update(x11, XEMBED_MAPPED);
}