[Xcb] XFixes CreateRegion with Python

Daniel Martin consume.noise at gmail.com
Mon Jan 14 06:28:31 PST 2013


On Sun, Jan 13, 2013 at 12:50:46PM +0000, Joshua Higgins wrote:
> Hi all,
> 
> I'm trying to create an xfixes region in python to pass into
> set_window_shape_region.
> 
>     conn = xcb.xcb.connect()
> 
>     xfixes = self.conn(xcb.xfixes.key)
> 
>     shapeRegion = conn.generate_id()
> 
>     xfixes.CreateRegionChecked(shapeRegion, 1, (0,0,0,0)).check()
> 
>     xfixes.SetWindowShapeRegion(windowxid, xcb.shape.SK.Input, 0, 0,
> shapeRegion)

I think conn and self.conn are different things. Could you try prefix
all conn`s with self.? Just a guess, the full code could have helped to
give a more precise (tested) answer.

> results in..
> 
>         xfixes.CreateRegionChecked(shapeRegion, 1, (0,0,0,0)).check()
>     xcb.xproto.BadRequest: <xcb.xproto.RequestError object at 0x92fedac>
> 
> 
> Removing the .check() there is no errors on the output but the input
> shape is not applied to the window.
> 
> Any ideas?
> 
> Thanks,
> Josh.
> 
> --
> Josh Higgins
> joshiggins at gmail.com
> _______________________________________________
> Xcb mailing list
> Xcb at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/xcb


More information about the Xcb mailing list