[Xcb] [PATCH] XKB: Fix broken events

Daniel Stone daniel at fooishbar.org
Thu Jun 21 11:16:34 PDT 2012


Hi,

On 21 June 2012 18:56, Josh Triplett <josh at joshtriplett.org> wrote:
> On Thu, Jun 21, 2012 at 12:40:02PM +0100, Daniel Stone wrote:
>> -     <event name="NewKeyboardNotify" number="0">
>> +     <event name="NewKeyboardNotify" number="0" no-sequence-number="true">
>> +             <field name="xkbType" type="CARD8" />
>> +             <field name="sequence" type="CARD16" />
>
> This seems wrong.  Filling in the byte before the sequence number
> shouldn't require using no-sequence-number.  Among other things,
> no-sequence-number implies that XCB can't use the event for
> sequence synchronization; just because you filled in a field named
> "sequence" in the right place doesn't mean that it has the semantics of
> a sequence number.

Ah, I didn't realise it had implications beyond just the naming, my
bad.  xcbgen seemed to more or less imply that if you had a field
called pad0 which was CARD8, then it'd write that into the struct.  Is
this the preferred way, and if so, would you take patches to allow
using a more descriptive name?

As for the switch - yeah, rather.  I just went for the quickest and
least likely to cause pain solution right now.  I guess a switch would
be better, but it does seem pretty monumentally ugly.

Cheers,
Daniel


More information about the Xcb mailing list