[Xcb] RFC: API break in xinput

Michael Stapelberg michael+xcb at stapelberg.de
Tue Jan 8 00:20:41 PST 2013

Hi Daniel,

Daniel Martin <consume.noise at gmail.com> writes:
> Well, that prefix comes at the price of longer generated names in
> libxcb and we have this prefix for everything new. Just to work around 2
> conflicts.
Given that we have really long names already, I don’t think we should
sacrifice correctness for shorter names. That is: use the prefix (IMO).

> In XI2 events are not prefixed and there's a FocusIn/Out too. But,
> that's due to a mistake as the "old" FocusIn/Out events we currently
> have should have been called DeviceFocusIn/Out:
>   http://cgit.freedesktop.org/xorg/proto/inputproto/tree/specs/XIproto.txt#n2361
> Here I realy would like to rename the "old" events, give them their
> proper names and therefor _break the api_.
I think that’s okay, given that the fix to compile with both old and new
xcb looks like this:

/* just as an example, not sure which version this will be and how the
   variable is called */
#define xcb_input_device_focus_in_event_t xcb_input_focus_in_event_t

> Any pros/cons on either aspect (prefix and rename) is highly
> appreciated. And do you know of a project that would affected?
I can’t find any project in Debian which uses xcb_input_focus_in_event_t
(given that this is the name you meant), see

This doesn’t mean that no project is affected of course, but at least
nothing major.

Best regards,

More information about the Xcb mailing list