[Xcb] Problem with XCB Python and RandR

Alberto Milone albertomilone at alice.it
Fri Oct 17 15:10:15 PDT 2008


Hi all,

I'm writing because I have a problem when I try to call the following function 
of RandR through XCB from Python:

XRRGetCrtcInfo (Display *dpy, XRRScreenResources *resources, RRCrtc crtc);

Calling it with something like this (where "it" is an int):
cookie = self.conn.randr.GetCrtcInfo(dpy, resources, resources.crtcs[it])

tells me that the functions accepts only 3 arguments (and I'm passing 4 if you 
include "self").

Calling it like this:
 self.conn.randr.GetCrtcInfo(resources, resources.crtcs[it])

throws this warning:
/usr/local/lib/python2.5/site-packages/xcb/randr.py:562: DeprecationWarning: 
'I' format requires 0 <= number <= 4294967295
  buf.write(pack('xx2xII', crtc, config_timestamp))

and the following error:
xcb.randr.BadCrtc: <xcb.randr.CrtcError object at 0x9fd0b6c>

Any ideas as to how should I call the function?

Regards,

Alberto Milone


More information about the Xcb mailing list