Skip to content

Commit

Permalink
x11: set the fullscreen state before mapping the window
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
wm4 committed May 15, 2014
1 parent 8f29f6f commit 7ad8c5f
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions video/out/x11_common.c
Expand Up @@ -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 |
Expand Down

0 comments on commit 7ad8c5f

Please sign in to comment.