[PATCH] Xinerama support

Xavier MAILLARD zedek at fxgsproject.org
Tue Jul 9 19:48:16 CEST 2002

Hello again !

Good. You will see attached to this message my patch for xinerama
support used by xvideo output renderer.

Think all is okay. 

The Xinerama is something trivial and coding it is too. The main goal of
this patch is to use only one screen for fullscreen mode. This allow you
to have one screen taken for video and keep on screen free for a
different use.

In the xvideo configuration window, you will find 2 new options : one is
to say if we want Xinerama support, the other is to select a screen
between further. Be carrefull when choosing the screen that '0' means
'first screen', '1' means second screen and so on. Letting it to '-1'
means you want vlc to choose the default value (that is to say the first
screen '0') but only if you have previously activated the Xinerama

Basic for coding is simple. When we switch to full screen, we have a
function that check we have enabled xinerama at compilation time and
that the support is activated. Then we scan to check the number of
screens we can use. To render the video, all we have to do is to tell
Xinerama to use either default screen (value is '-1' or '0') or defined
user screen (case >0 and < to total number of screens). As we can have
different resolution per screen, we have to tell Xinerama to search for
the upper left coordinate of the screen to use and check for the screen

After all, we can pass the (x,y) couple and Height,Width to the
XRemoveResizeWindow function that is in charge of the placement to the
right place.

Another thing, when switching to fullscreen mode, we are saving the old
window used for rendering into windowed mode. This was annoying because
we have to deal with the fact this window has 50% chances to be
displayed onto the bad screen. So to annihilate this "side effect", when
switching, we previously unmap video output window and when we switch
back into "windowed mode", we restore it back by mapping it. 

To enable Xinerama at configure/compilation time, you should either let
the configure script choose or force it by adding "--enable-xinerama" in
configure command line. The script will check you have previously
activated xvideo that is sufficient to enable xinerama extension

I hope I have been clear and complete but as english is not my native
language, this is not sure :)

The patch was made against the unstable branch of vlc. All you have to
do is to type this command :

cd /your/unstable/tree && patch -p1

and then it's classic.

Any comments will be appreciated. 



-------------- next part --------------
A non-text attachment was scrubbed...
Name: vlc-xinrema.patch
Type: text/x-patch
Size: 248881 bytes
Desc: Xinerama patch
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20020709/2a693473/attachment.bin>

More information about the vlc-devel mailing list