[Xcb] Fwd: Problem with XCB Python and RandR

Alberto Milone albertomilone at gmail.com
Mon Oct 20 15:14:49 PDT 2008


On Monday 20 October 2008 20:08:17 you wrote:
> Alberto Milone wrote:
> > I have tried to override the check in xpybList_init() in list.c (only for
> > testing):
> > /*if (length * size + offset > datalen) {
> > 	PyErr_SetString(xpybExcept_base, "Protocol object buffer too short.");
> > 	return -1;
> >     }*/
> >
> > I can get the crtcinfo however one of its struct members (or object
> > attributes) doesn't seem to be right. I'm referring to crtcinfo.mode
> > which is an int equal to 4128769 but (as far as I know) it should be
> > either an RRMode object or (if it's meant to be a an integer) a mode id
> > but it's too big and doesn't match any of the available modes.
> >
> > Other than this xpyb is great and I'm using it to write Python bindings
> > for RandR.
> >
> > If you need further information to investigate this problem, please let
> > me know.
>
> Found the problem it's a bug in the XML spec.  =/
>
> You'll have to rebuild xpyb using the correct spec, either hand-fix your
> current one or pull from upstream.
>
>
> diff --git a/src/randr.xml b/src/randr.xml
> index aa14dc6..1700c49 100644
> --- a/src/randr.xml
> +++ b/src/randr.xml
> @@ -371,7 +371,6 @@ authorization from the authors.
>  		<reply>
>  			<field type="CARD8" name="status" />	<!-- enum SetConfig -->
>  			<field type="TIMESTAMP" name="timestamp" />
> -			<field type="CARD32" name="crtc" />
>  			<field type="INT16" name="x" />
>  			<field type="INT16" name="y" />
>  			<field type="CARD16" name="width" />

First of all thanks a lot for the fix, it solved my problem. I still have to 
comment out those lines in list.c though.

The attached patch solves another problem with crtc.possbile. Can you see if 
it works for you and maybe commit the fix?

Regards,

Alberto Milone
-------------- next part --------------
A non-text attachment was scrubbed...
Name: randr.diff
Type: text/x-patch
Size: 338 bytes
Desc: not available
Url : http://lists.freedesktop.org/archives/xcb/attachments/20081021/28602008/attachment.bin 


More information about the Xcb mailing list