summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2014-05-15 23:55:27 +0200
committerwm4 <wm4@nowhere>2014-05-15 23:56:14 +0200
commit7ad8c5ff3352a6ae775ce12b2473aa7cf499cb2a (patch)
treee52610c1ddda6b93d10aeda01e7581bf42d5c088
parent8f29f6fc61c7a7026313a02ebda00f247a57378e (diff)
downloadmpv-7ad8c5ff3352a6ae775ce12b2473aa7cf499cb2a.tar.bz2
mpv-7ad8c5ff3352a6ae775ce12b2473aa7cf499cb2a.tar.xz
x11: set the fullscreen state before mapping the window
This should get rid of some flickering. Since this actually skips all the wacky fullscreening code on startup, this might lead to certain wacky features to stop working. In this case, you'll have to use the --x11-fstype option, and disable _NETWM_STATE_FULLSCREEN usage.
-rw-r--r--video/out/x11_common.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/video/out/x11_common.c b/video/out/x11_common.c
index af867ea8d6..2ffa44963b 100644
--- a/video/out/x11_common.c
+++ b/video/out/x11_common.c
@@ -1301,6 +1301,17 @@ static void vo_x11_map_window(struct vo *vo, int x, int y, int w, int h)
vo_x11_move_resize(vo, true, true, x, y, w, h);
if (!vo->opts->border)
vo_x11_decoration(vo, 0);
+
+ if (vo->opts->fullscreen && (x11->fs_type & vo_wm_FULLSCREEN)) {
+ Atom state = x11->XA_NET_WM_STATE_FULLSCREEN;
+ XChangeProperty(x11->display, x11->window, x11->XA_NET_WM_STATE, XA_ATOM,
+ 32, PropModeAppend, (unsigned char *)&state, 1);
+ x11->fs = 1;
+ // The "saved" positions are bogus, so reset them when leaving FS again.
+ x11->size_changed_during_fs = true;
+ x11->pos_changed_during_fs = true;
+ }
+
// map window
vo_x11_selectinput_witherr(vo, x11->display, x11->window,
StructureNotifyMask | ExposureMask |