[Xcb] How do I distinguish XKB events?

Christian Linhart chris at DemoRecorder.com
Wed Jan 6 13:57:13 PST 2016


I think that we need to change client.py and the parser in proto/xcbgen for the double-opcode system of XKB events.

BTW, the current XKB-implementation in XCB is very buggy.
So, I advise against using it at this state.

I have sent a fixed version as an RFC-patch a while ago, but not yet documented the many changes.
The documentation of the changes is needed for the review process.

Chris

On 2015-12-29 14:04, Klemens Baum wrote:
> On Mon, Dec 28, 2015 at 7:15 PM,  <me at beroal.in.ua> wrote:
>> So how do I distinguish XKB events?
> This seems to be an omission from XCB. Most projects seem to work
> around it by checking the pad0 member in xcb_generic_event_t (as seen
> here: https://github.com/wxg4net/awesome-src/blob/8c0c2e8f56c6e269e7a3c11f66f95fb2f3751e76/xkb.c#L123)
> or by defining their own generic struct
> (https://github.com/andrenho/perminal/blob/f7406f3f4f4c95c54e0cc668593b114226cdcb4f/.old/cpp/frontend/xkb_keyboard.cc#L212).
>
> To prepare a patch, we would first need to decide which header the
> generic XKB struct should go into. As far as I know xcb/xkb.h is
> entirely auto-generated, so if it should go in there we could add an
> <event name="GenericEvent"> to proto/src/xkb.xml. But events list an
> opcode in the `number' attribute, and c_client.py seems to assume this
> is always the case in order to generate the corresponding #define. So
> c_client.py would need an additional conditional check for events that
> do not have an opcode.
> Alternatively, it could go into xcb.h, which can be manually edited.
>
> What do others think?
> _______________________________________________
> Xcb mailing list
> Xcb at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/xcb



More information about the Xcb mailing list