Hi there,

  I'm trying to draw large scenes on multi monitor setups.  I can get all 
screens and the resolutions of the screens via:

numberOfScreens = XScreenCount(dpy);
/* Work out the sizes of the screens */               
for (int j = 0; j<numberOfScreens; j++)
{
        Screen *screen = XScreenOfDisplay(dpy, j);
        SIZE_X = DisplayWidth(dpy,j);
        SIZE_Y = DisplayHeight(dpy, j);
        printf("Width::%d\tHeight::%d\n", DisplayWidth(dpy,j), 
DisplayHeight(dpy,j));
}

But how can I get where one screen is in relation to another?  
eg.  If there are four(4) 2560x1600 monitors arranged in a column, the top 
screen has its first pixel at [0,0], the second monitor is [0, 1600], third is 
[0,3200], etc

This is ok to dodgy hack, but when I move to a machine where the monitors are 
arranged horizontally
eg [0,0], [2560,0], [5120, 0] and [7680,0]

All breaks.  I would prefer not to have a configuration file and would also 
prefer not to parse the xorg.conf file.

PS. I have have temporarily confused the [0,0] pixel with opengl (bottom left - 
as opposed to top left for a screen.  Hopefully you still get the idea).

Any pointers?  It appears as though xdotool appears to know this information 
when moving a mouse.

Cheers

Mark
_______________________________________________
xorg@lists.freedesktop.org: X.Org support
Archives: http://lists.freedesktop.org/archives/xorg
Info: http://lists.freedesktop.org/mailman/listinfo/xorg
Your subscription address: arch...@mail-archive.com

Reply via email to