xkb: Make all the breaking changes
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:
- Use <pad align> instead of a complex alignment_pad calculation that predates the existence of <pad align> in CountedString16.
- Uncomment Property now that CountedString16 works as expected.
- Rewrite Doodad to use <switch> instead of <union>. 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.
- Uncomment modLatches in LatchLockState
- 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