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

Ingo Brückl ib at wupperonline.de
Wed Aug 17 18:19:48 CEST 2011


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;

#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.)

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

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

What to do best?

Ingo


More information about the MPlayer-dev-eng mailing list