Best way of determining multiple monitor config?

JM Ibanez jm at orangeandbronze.com
Wed Dec 19 01:10:49 PST 2007


Hamish <hamish at travellingkiwi.com> writes:

> On Tuesday 18 December 2007 06:50:18 you wrote:
>> Hamie <hamish at travellingkiwi.com> writes:
>> > Hi.
>> >
>> > What's the current recommended method of an application determining the
>> > configuration of (Possibly) multiple monitor setup? Should I still use
>> > the libXinerama calls? Or are there 'better' calls to use nowadays?
>>
>> As I understand it, the recommended way is via XRandR 1.2; although the
>> XRandR 1.2 extension does have Xinerama legacy support, XRandR 1.2 has
>> the added ability to detect runtime changes to the configuration (and
>> more accurate detection of monitor placement, etc.).
>
>
> Hmm... That's what I thought. But although I can get the screens & sizes with 
> Xinerama no problems, I couldn't find anything in RandR that gave the szes of 
> individual screens... Just the total size (Apart from XRRGetScreenInfo which 
> says returns XRRScreenConfiguration, which looks perfect until I read the bit 
> about opaque data type for internal use only...).
>
> maybe I'm looking at the wrong place in RandR?

Check out the changes to RandR in 1.2; be sure to read randrproto.txt in
the protocol's tree. Clone it from

 git://anongit.freedesktop.org/git/xorg/proto/randrproto


Additionally, you may want to study the source for the xrandr(1) CLI
utility, which does implement the querying of the configuration of all
outputs.

-- 
JM Ibanez
Software Architect
Orange & Bronze Software Labs, Ltd. Co.

jm at orangeandbronze.com
http://software.orangeandbronze.com/



More information about the xorg mailing list