<html>
    <head>
      <base href="https://bugs.freedesktop.org/" />
    </head>
    <body><span class="vcard"><a class="email" href="mailto:consume.noise@gmail.com" title="Daniel Martin <consume.noise@gmail.com>"> <span class="fn">Daniel Martin</span></a>
</span> changed
              <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW --- - various problems with the xkb protocol bindings"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=51295">bug 51295</a>
        <br>
             <table border="1" cellspacing="0" cellpadding="8">
          <tr>
            <th>What</th>
            <th>Removed</th>
            <th>Added</th>
          </tr>

         <tr>
           <td style="text-align:right;">CC</td>
           <td>
                
           </td>
           <td>consume.noise@gmail.com
           </td>
         </tr></table>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW --- - various problems with the xkb protocol bindings"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=51295#c1">Comment # 1</a>
              on <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW --- - various problems with the xkb protocol bindings"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=51295">bug 51295</a>
              from <span class="vcard"><a class="email" href="mailto:consume.noise@gmail.com" title="Daniel Martin <consume.noise@gmail.com>"> <span class="fn">Daniel Martin</span></a>
</span></b>
        <pre>(In reply to <a href="show_bug.cgi?id=51295#c0">comment #0</a>)
<span class="quote">> 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.</span >

That would be a switch/case. Which is no fun to add into the existing code
generator.

I could think of a workaround/hack:
- transform the existing events into structures
- add one event with the structure like xkbAnyEvent
With that one could cast the incoming sub events into the appropriate
structures and we would just have one event.

But, one day we'll have a switch/case (I promise, just a matter of [spare]
time). If we're going to replace the workaround with the switch/case we'll have
an API break.


<span class="quote">> 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.</span >

That's easy to fix, i.e. with the following attachment. Well "easy to fix" with
the assumption: The generated event structures are incorrect and therefor the
SelectEvents request hasn't been used by anyone. Because, that patch replaces
XCB_XKB_EVENT_TYPE_BELL_NOTIFY, which potentially has been used to select
events. The old one is renamed to XCB_XKB_EVENT_TYPE_MASK_BELL_NOTIFY.
So, if the assumption is wrong, then this is an API break and another name for
the enum with the BellNotify=8 has to be choosen.</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are the QA Contact for the bug.</li>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>