[MPlayer-dev-eng] [PATCH] libvo/x11_common: resize window before mapping it.

wm4 nfxjfg at googlemail.com
Wed Feb 6 19:32:06 CET 2013

On Wed, 6 Feb 2013 19:22:23 +0100
Nicolas George <nicolas.george at normalesup.org> wrote:

> There is the matter of the initial placement of the window: if the
> user did not specify -geometry, the WM is supposed to ignore the
> parameters given to XCreateWindow and select a good position. Mine
> does, but according to the 320×200 dummy size, and the effect is
> ruined by the immediate resize: at best, the resized window will
> overlap with an existing window, while there was room not to
> elsewhere on the screen, at worst it will overflow the screen.

There's a simpler way: destroy the hidden window after probing for
OpenGL, and recreate the window when it's actually needed. You don't
need to change anything in the X11 code, just change vo_gl (or was it
gl_common) to tear down the X11 state completely after probing. I did
that in various mplayer forks and it works well.

More information about the MPlayer-dev-eng mailing list