Xorg starts and creates a virtual screen
Virtual screen size determined to be 3120 x 1050
spanning my 2 physical screens of 1680x1050 and 1440x900, using xinerama I guess.
There is no configuation file and I don't want to change the system settings.
My application was using DisplayWidth and DisplayHeight to retrieve the screen size, which was fine on a single-screen setup.
maxwidth = DisplayWidth (dpy, scrnum);
maxheight = DisplayHeight (dpy, scrnum);
But on the dual-screen setup with a virtual screen automatically created, those functions return the size of the virtual screen.
I've tried different ways to retrieve the physical screen size, with the same result :
maxwidth = XWidthOfScreen (XScreenOfDisplay(dpy, scrnum));
maxheight = XHeightOfScreen (XScreenOfDisplay(dpy, scrnum));
or
XWindowAttributes attr;
XGetWindowAttributes(dpy, RootWindow(dpy, scrnum), &attr);
maxwidth = attr.width;
maxheight = attr.height;
Is it possible to retrieve the size of the physical screens using only Xlib ? I would like to avoid adding more library dependencies just to set the size of a window, but may be this can be achieve using Xrand extension ?