[Xcb] Switch for events with equal event number

Daniel Martin consume.noise at gmail.com
Tue Jan 15 23:07:44 PST 2013


On Tue, Jan 15, 2013 at 09:48:44AM -0500, Peter Harris wrote:
> On 2013-01-15 07:38, Daniel Martin wrote:
> > 
> > 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).
> 
> Well, no, because other extensions (may) define generic events too.
> 
> > How could we fix that?
> 
> The only sane thing to do is to redefine number= to refer to
> ge_event->event_type (not event->response_type) when the xge attribute
> is present.

And make those xkb events a special case of this, where number= refers
to xkbType?

Do we need something to declare which value we expect in response_type?
For xge events this is clear, as we can assume it's '35'. For xkb events
we would need '0'.


More information about the Xcb mailing list