[Xcb] Switch for events with equal event number
Daniel Martin
consume.noise at gmail.com
Tue Jan 15 04:38:17 PST 2013
Hi,
let's revive this thread. Because, XI2 events fall into the same
problematic case and are (imho) much more hard to fix.
On Thu, Jun 21, 2012 at 11:15:13AM -0700, Josh Triplett wrote:
> On Thu, Jun 21, 2012 at 12:40:02PM +0100, Daniel Stone wrote:
> > XKB events all have exactly the same event number - 0 (from the XKB
> > event base).
...
> Based on what you described in the commit message, this part also seems
> wrong: as you said, all the events have event number 0. I think you
> need a single <event name="XKBEvent" number="0"> with a <switch> on
> xkbType, as mentioned in a subsequent mail to the XCB list.
All XI2 events are generic events (number 35). Just based on this, we
could use a big fat switch and merge all events in (I expect the switch
to become 200+ lines).
But, to make the decission correct, you've to compare if the extension
field really contains the XI2 extension number/opcode, which has to be
aquired at runtime with xcb_query_extension().
How could we fix that?
Cheers,
Daniel Martin
PS: For the beginning, I'll ignore that problem in the xinput
implementation and treat XI2 events like normal events (except for the
xge attribute).
More information about the Xcb
mailing list