From 7ad8c5ff3352a6ae775ce12b2473aa7cf499cb2a Mon Sep 17 00:00:00 2001 From: wm4 Date: Thu, 15 May 2014 23:55:27 +0200 Subject: 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. --- video/out/x11_common.c | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'video/out/x11_common.c') 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 | -- cgit v1.2.3