Skip to content

xkb: Make all the breaking changes

Peter Harris requested to merge peterh/xcbproto:xkb into master

An update to xkb.xml is long overdue, but has been put on hold to avoid breaking existing users of the library.

It has been almost a decade since the comment "This pad is a workaround to prevent an API break" was added. One API adjustment per decade sounds about right, so here we go:

  1. Use instead of a complex alignment_pad calculation that predates the existence of in CountedString16.
  2. Uncomment Property now that CountedString16 works as expected.
  3. Rewrite Doodad to use instead of . This is necessary because the various types of Doodad are not all the same length on the wire (eg. CountedString16 can be an arbitrary length). And, in general, union is useless for pretty-printers like Wireshark and languages other than C.
  4. Uncomment modLatches in LatchLockState
  5. Uncomment GetGeometry and SetGeometry requests

Note that this is a breaking change. The libxcb maintainers will need to bump the API and ABI version numbers (and, ideally, coordinate with consumers of xcb-xkb to detect the changed API).

I make no claims about the correctness or usability of the code generated by libxcb. I only tested this set of changes in a pretty-printer similar to Wireshark. In fact, it turns out that libxcb generates incorrect code because the various Doodad fields are not scoped as tightly as they could be in xcb_xkb_doodad_doodad_type_t. See Pipeline failure for details. I welcome comments on whether this should be fixed generally in libxcb, or in xcbproto by changing the names of the various fields in the Doodad switch.

Submitted in response to #19

Merge request reports