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.
This commit is contained in:
wm4 2014-05-15 23:55:27 +02:00
parent 8f29f6fc61
commit 7ad8c5ff33
1 changed files with 11 additions and 0 deletions

View File

@ -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); vo_x11_move_resize(vo, true, true, x, y, w, h);
if (!vo->opts->border) if (!vo->opts->border)
vo_x11_decoration(vo, 0); 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 // map window
vo_x11_selectinput_witherr(vo, x11->display, x11->window, vo_x11_selectinput_witherr(vo, x11->display, x11->window,
StructureNotifyMask | ExposureMask | StructureNotifyMask | ExposureMask |