[MPlayer-dev-eng] GUI and vo_x11 functions

Ingo Brückl ib at wupperonline.de
Fri Aug 26 12:38:28 CEST 2011


I'm about to commit the vo_x11_ewmh_fullscreen() patch which adds a window
parameter to the function, but I'm not quite sure whether this really is ok,
although I got permission.

The question is whether vo_x11_ewmh_fullscreen() and all the other vo_x11
functions should only operate on the global vo variables (like vo_window in
that case) or whether they should be reusable functions, offering services
for whoever wants to call them (the GUI in my case).

The reason why I raise this issue is that the GUI does call three other
vo_x11 functions (with relative success), namely

vo_x11_decoration()
vo_x11_sizehint()
vo_x11_setlayer()

While vo_x11_decoration() seems to be problem-free (it has some useful
parameters, but uses global variables as well), vo_x11_sizehint() mostly uses
global variables (which causes some X errors with the GUI then if called at a
time when these variables aren't yet set). vo_x11_setlayer() is pointlessly
called by the GUI, because it doesn't do anything in case of WinID >= 0.

So, what is the right way to continue? Setting all necessary global vo
variables in the GUI - even prior to the vo driver (vo_window is known to
become WinID later anyway, for example), trying to modestly patch these four
functions so that they can be reused or copy the code and letting the GUI use
its own copies?

All these four functions are window specific and window handling should be
GUI's task although commonly used code is convenient.

Pros and cons should be obvious.

Ingo


More information about the MPlayer-dev-eng mailing list