[Xcb] [PATCH proto xkb] Fixes for xkb.xml

Christian Linhart chris at DemoRecorder.com
Sun Feb 23 08:59:02 PST 2014


Hi Ran,

You are right, the xkbGetKbdByName-request has a pad after the field "load". (  I have looked in the wrong part of the spec. Now I have found the protocol definitions which are in an appendix of the spec. Sorry for that oversight.)

It seems that my previous removal of the pad has just compensated another bug ( which is fixed now, so I needed to add the pad again to get it work again. )

BTW, thank you for sending me your test program.
I will extend your test program and test my patches of the generator and of the xml with it.
When everything works, I'll post another set of patches and the extended test program, so that everybody can verify this easily.
This may take a while, maybe one or two weeks or so.

Chris

P.S: Thank you for your hints about making better patches etc, I'll apply them for the next set of patches.

On 02/21/14 21:12, Ran Benita wrote:
>>  From 5b57472da786b2aba37807b4888044e686c1a956 Mon Sep 17 00:00:00 2001
>> From: Christian Linhart<chris at DemoRecorder.com>
>> Date: Fri, 14 Feb 2014 15:55:39 +0100
>> Subject: [PATCH 1/5] xkb: pad removed in GetKbdByName
>>
>> The 1-byte pad after "load" is not in the spec and therefore harmful.
>> (No implicit pad is needed here either because the field after it
>> is a 1-byte value anyways.)
>> ---
>>   src/xkb.xml |    1 -
>>   1 files changed, 0 insertions(+), 1 deletions(-)
>>
>> diff --git a/src/xkb.xml b/src/xkb.xml
>> index 9ef4402..ebfa5bf 100644
>> --- a/src/xkb.xml
>> +++ b/src/xkb.xml
>> @@ -1992,7 +1992,6 @@ authorization from the authors.
> [Small note: Daniel Martin added a nice snippet to make the patches
> mention which request is changed. See the HACKING file:
> http://cgit.freedesktop.org/xcb/proto/plain/HACKING
> ]
>
>>   		<field name="need" type="CARD16" mask="GBNDetail" />
>>   		<field name="want" type="CARD16" mask="GBNDetail" />
>>   		<field name="load" type="BOOL" />
>> -		<pad bytes="1" />
> But it is in the spec, here:
>
>      1     CARD8          opcode
>      1     23          xkb-opcode
>      2     3+(6+m+k+t+c+s+g+p)/4          request-length
>      2     KB_DEVICESPEC           deviceSpec
>      2     SETofKB_GBNDETAILMASK          need
>      2     SETofKB_GBNDETAILMASK          want
>      1     BOOL          load
>      1               unused
>
> Also in X11/extensions/XKBproto.h:
>
>      typedef struct _xkbGetKbdByName {
>          CARD8       reqType;
>          CARD8       xkbReqType;     /* always X_KBGetKbdByName */
>          CARD16      length B16;
>          CARD16      deviceSpec B16;
>          CARD16      need B16;       /* combination of XkbGBN_* */
>          CARD16      want B16;       /* combination of XkbGBN_* */
>          BOOL        load;
>          CARD8       pad;
>      } xkbGetKbdByNameReq;
>      #define sz_xkbGetKbdByNameReq   12
>
> It makes sense in order to make the following lists word-aligned.
>
>>   		<!-- XXX: Intermixed fixed size fields and lists are broken
>>   		<field name="keymapsSpecLen" type="CARD8" />
>>   		<list name="keymapsSpec" type="STRING8">
>> -- 
>> 1.7.2.5
>>
> _______________________________________________
> Xcb mailing list
> Xcb at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/xcb
>



More information about the Xcb mailing list