[Xcb] Problem with xpyb and setCrtcConfig()

Peter Harris peter.harris at hummingbird.com
Mon Nov 3 07:48:03 PST 2008


Alberto Milone wrote:
> On Friday 31 October 2008 17:52:28 you wrote:
>> Upon closer inspection, it takes two lists of XIDs, not one. Ugh. That
>> might be difficult to describe well in the XML.
>>
> Why two lists? I see only this:
> outputs: LISTofOUTPUT

My mistake. I confused myself when looking at the server side
implementation. One list is correct.

> I have modified randr.xml as follows:
> 
> 	<xidtype name="RROutput" />
> 
> 	<request name="SetCrtcConfig" opcode="21">
> 		<field type="CARD32" name="crtc" />
> 		<field type="TIMESTAMP" name="timestamp" />
> 		<field type="TIMESTAMP" name="config_timestamp" />
> 		<field type="INT16" name="x" />
> 		<field type="INT16" name="y" />
> 		<field type="CARD32" name="mode" />
> 		<field type="CARD16" name="rotation" />		<!-- enum Rotation -->

 <pad bytes="2" />
 <list type="RROutput" name="outputs" />

> 		<reply>
> 			<field type="CARD8" name="status" />	<!-- enum SetConfig -->
> 			<field type="TIMESTAMP" name="timestamp" />
> 		</reply>
> 	</request>

> but I'm still getting this error:
>  File "xrandr-proto.py", line 640, in rr_crtc_set_config
>     result = cookie.reply()
> xcb.xproto.BadMatch: <xcb.xproto.MatchError object at 0x875a98c>
> 
> Is there anything I'm missing?

Two padding bytes, and the fact that the length of the list is implicit
(similar to xproto PolyPoint/PolyLine/etc), as far as I can see.

For bonus points, you can also modify the rest of the randr requests
that use an RROutput to use your new xidtype instead of CARD32 where
appropriate.

Peter Harris
-- 
     Hummingbird Connectivity - A Division of Open Text
Peter Harris                    http://connectivity.hummingbird.com
Research and Development        Phone: +1 905 762 6001
peter.harris at hummingbird.com    Toll Free: 1 877 359 4866


More information about the Xcb mailing list