psychon / x11rb

X11 bindings for the rust programming language, similar to xcb being the X11 C bindings
Apache License 2.0
367 stars 40 forks source link

Some xcb-proto XKB definitions are broken #357

Open eduardosm opened 4 years ago

eduardosm commented 4 years ago

For example, the GetKbdByName request has some fields commented out: https://github.com/psychon/x11rb/blob/591a1f00a462da77db181e9c0b4038849ae15ca3/xcb-proto-1.14-1-g2b3559c/src/xkb.xml#L1985-L2017 I believe these are unsupported by c_client.py, but our new generator should handle them fine.

There is also this: https://github.com/psychon/x11rb/blob/591a1f00a462da77db181e9c0b4038849ae15ca3/xcb-proto-1.14-1-g2b3559c/src/xkb.xml#L2295-L2298

Looking at Property: https://github.com/psychon/x11rb/blob/591a1f00a462da77db181e9c0b4038849ae15ca3/xcb-proto-1.14-1-g2b3559c/src/xkb.xml#L550-L569

There are two commented definitions, saying that they are broken, but without explaining why.

There are other commented definitions scattered over the XML, supposedly broken.

psychon commented 4 years ago

XKB's LatchLockState also contains a similar gem. Still, I would try to merge such changes upstream first. E.g. one could change libxcb's code generator to explicitly handle some things specially based on their name.

        <pad bytes="1" /> <!-- This pad is a workaround to prevent an API break,
                               which the following field (correct fix) would cause.
        <field name="modLatches" type="CARD8" mask="ModMask" />