[Xcb] Problem with xpyb and setCrtcConfig()

Alberto Milone albertomilone at gmail.com
Mon Nov 3 02:54:15 PST 2008


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

> > I have this in my /usr/include/xcb/randr.h:
>
> That file is generated from randr.xml, so if there is a bug in randr.xml
> (which there is), it will be reflected in that file.
>
> See the protocol specification document above.
>
> Peter Harris

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 -->
		<field type="RROutput" name="output" />
		<list type="CARD32" name="outputs">
			<fieldref>output</fieldref>
		</list>
		<reply>
			<field type="CARD8" name="status" />	<!-- enum SetConfig -->
			<field type="TIMESTAMP" name="timestamp" />
		</reply>
	</request>

and I'm doing this:
cookie = self.conn.randr.SetCrtcConfig(crtc.id, crtc.timestamp, 
resources.config_timestamp, x, y, mode.id, rotation, output.id, map(lambda n: 
n.id, outputs))

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?

P.S. thanks for your help. I would love make extensive use of xpyb in Debian 
and Ubuntu (for my Python library).

Regards,

Alberto Milone


More information about the Xcb mailing list