[Xcb] [Bug 51295] New: various problems with the xkb protocol bindings

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Thu Jun 21 06:41:48 PDT 2012


https://bugs.freedesktop.org/show_bug.cgi?id=51295

             Bug #: 51295
           Summary: various problems with the xkb protocol bindings
    Classification: Unclassified
           Product: XCB
           Version: unspecified
          Platform: Other
        OS/Version: All
            Status: NEW
          Severity: minor
          Priority: medium
         Component: Protocol
        AssignedTo: xcb at lists.freedesktop.org
        ReportedBy: psychon at znc.in
         QAContact: xcb at lists.freedesktop.org


While looking at
http://lists.freedesktop.org/archives/xcb/2012-June/007800.html, I noticed some
more problems with the XKB bindings. Since they won't be fixed any time soon,
let's make a meta-bug "xkb is ugly" to make sure that these issues don't get
forgetten. So here it is.

The XKB extension has only a single event number. These events contain a
xkbType field which then says which kind of event this actually is.
The current xkb.xml describes these events as seperate events, but from the POV
of the generator, they are just a single event.

<psychon> daniels: <event name="BellNotify" number="8"> <- doesn't the "8" here
mean that the event is xkb-event-base + 8?
[...]
<daniels> so technically having them as separate <event>s is wrong i think
<daniels> but i'm not sure how to cover loads of totally disparate events all
having the same event type
<pharris> daniels: One event, with a giant <switch>.
[...]
<pharris> daniels: Or possibly a <union>, but I dislike <union> as it doesn't
represent well in non-C languages.

The second issue is:

<enum name="EventType"> [...] <item name="BellNotify"> <bit>8</bit> </item>

This causes a #define XCB_XKB_EVENT_TYPE_BELL_NOTIFY 256 to be generated, but
this actually wants a define with value 8.

The above was noticed while looking at this for 2 minutes and comparing it with
Xlib's src/xkb/XKBUse.c, function wire_to_event() and proto/kbproto's
X11/extension/XKBproto.h, struct XkbStateNotifyEvent. I bet that a closer
inspection would find more problems.

-- 
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA Contact for the bug.
You are the assignee for the bug.


More information about the Xcb mailing list