[MPlayer-dev-eng] GUI and vo_x11_ewmh_fullscreen()

Reimar Döffinger Reimar.Doeffinger at gmx.de
Wed Aug 17 21:49:11 CEST 2011


On Wed, Aug 17, 2011 at 06:19:48PM +0200, Ingo Brückl wrote:
> The GUI needs to call vo_x11_ewmh_fullscreen() for fullscreen preparation of
> its video window before a vo driver "creates" a window ("creating" meaning in
> that case using WinID window instead of actually creating an own one), and
> thus before vo_window is set (to WinID).
> 
> There seem to be four different approaches to overcome the problem, but I
> don't know what is the best way to do it.
> 
> #1: (my favorite) Patch vo_x11_ewmh_fullscreen() to use WinID. (If there is
>     a WinID, the vo driver will set vo_window to WinID later anyway.)
> 
>     Index: libvo/x11_common.c
>     ===================================================================
>     --- libvo/x11_common.c	(revision 33996)
>     +++ libvo/x11_common.c	(working copy)
>     @@ -159,7 +159,7 @@
>              xev.xclient.serial = 0;
>              xev.xclient.send_event = True;
>              xev.xclient.message_type = XA_NET_WM_STATE;
>     -        xev.xclient.window = vo_window;
>     +        xev.xclient.window = WinID ? (Window)WinID : vo_window;
>              xev.xclient.format = 32;
>              xev.xclient.data.l[0] = action;
>              xev.xclient.data.l[1] = XA_NET_WM_STATE_FULLSCREEN;

The -wid window should not be messed with, this would give people wrong
ideas I think.

> #2: Set vo_window = WinID in GUI as soon as the GUI has created the video
>     window. (What I don't like about this, I don't know whether the vo driver
>     can handle vo_window properly until it has set it itself.)

That seems risky.

> #3: Add a parameter (the window ID) to vo_x11_ewmh_fullscreen().

Should be ok. The only thing I don't like much is that
vo_x11_ewmh_fullscreen probably really should be static, it
doesn't seem to be used anywhere outside x11_common.c right now.

> #4: Copy the vo_x11_ewmh_fullscreen() code to the gui code and call the gui
>     version of it.

Not really good, but since it's really little code that isn't much of
a problem either.
I guess between these it might really depend on whether you want that
vo_fs_type & vo_wm_FULLSCREEN check or not...
If you want your own GUI setting for it copying it might be better.


More information about the MPlayer-dev-eng mailing list