I'm excited to upgrade wezterm to the v1 API, but it's been a bit of a slog as wezterm also uses the xcb-util and xcb-imdkit crates.
The latter needs to forward requests to XIM in order to allow the IME to process them. The underlying C API wants the generic events for this, so I'm faced with the arduous task of writing a function like this to extract it from the event:
it's a bit problematic as the Event enum covers all possible event types, but the total set of enum variants varies depending on the features enabled in the xcb crate.
Could Raw<xcb_generic_event_t> be implemented on Event itself to avoid this?
I'm excited to upgrade wezterm to the v1 API, but it's been a bit of a slog as wezterm also uses the
xcb-util
andxcb-imdkit
crates. The latter needs to forward requests to XIM in order to allow the IME to process them. The underlying C API wants the generic events for this, so I'm faced with the arduous task of writing a function like this to extract it from the event:it's a bit problematic as the
Event
enum covers all possible event types, but the total set of enum variants varies depending on the features enabled in the xcb crate.Could
Raw<xcb_generic_event_t>
be implemented onEvent
itself to avoid this?