[Xcb] Wrong value_mask type in for ConfigureWindow?

Peter Harris pharris at opentext.com
Tue Jan 13 10:33:31 PST 2009

Friedrich Weber wrote:
> I'm currently experimenting with the xcb-proto protocol description 
> files and xcbgen in order to create another Python binding. I've had 
> some trouble getting the `ConfigureWindow` request running (crashed with 
> a BadValue error), and it seems like the `ConfigureWindow` request has a 
> wrong value-mask-type set in xproto.xml (it's CARD16 at the moment).
> The Core X Protocol documentation 
> (http://www.xfree86.org/current/proto.pdf) specifies BITMASK as a CARD32 
> on page 115. However, it reserves only 2 Bytes for the bitmask for the 
> ConfigureWindow request (see page 125), followed by 2 unused bytes.
> In order to 'fix' that, I changed the value-mask-type from CARD16 to 
> CARD32, and the generated bindings did their job properly. However, I am 
> very unsure if that change will work on other machines, because it looks 
> like a dirty hack ;)
> What do you think about that?

I think it is not only a dirty hack, but also wrong.

On an LSB-first connection, a CARD32 should be identical to
CARD16+pad(2). So I strongly suspect your binding generator is busted.
Maybe you forgot the pad(2) part?

That, and it obviously won't work on an MSB machine after your change.

Peter Harris
               Open Text Connectivity Solutions Group
Peter Harris                    http://www.opentext.com/connectivity
Research and Development        Phone: +1 905 762 6001
pharris at opentext.com            Toll Free: 1 877 359 4866

More information about the Xcb mailing list