[Xcb] [patch] bugfix: xproto.xml request GetKeyboardMapping
Barton C Massey
bart at cs.pdx.edu
Fri Nov 30 23:56:48 PST 2007
In message <e2ed954f0711302326t8440c44p24c37e0ab46d2896 at mail.gmail.com> you wrote:
> > i think i found a bug, however. below is the local fix.
> > what do you think?
>
> > - <fieldref>length</fieldref>
> > - <value>4</value>
>
> You know... I think that *is* buggy. The protocol
> specification says that the length of the list, in bytes,
> is "4nm", where "nm" is stored in the length field of the
> reply.
Oh. Just looked at the detail description. I hadn't
realized the length isn't the length of the entire reply,
including storage for keysyms-per-keycode.
> But each list element is a KEYSYM, which is just a CARD32,
> so the size of each list element is 4. The current
> definition, then, declares that the list is 16*n*m bytes
> long.
Yeah, the number of keysyms is clearly directly in the
length field.
> > + <fieldref>count</fieldref>
> > + <fieldref>keysyms_per_keycode</fieldref>
>
> But we can't use your fix as-is, because the value of the 'count' field
> in the request is not available when the reply is being processed.
Yeah, I realized that a bit ago, and came up here to take
back my previous botched post.
> I think the following patch should work instead, but would
> somebody else review before I screw up our protocol
> descriptions? :-)
The patch looks fine to me. Looks like no one has
previously asked for a keyboard mapping.
Bart
More information about the Xcb
mailing list