QX7EZHEWNDXQ6UY3TKNXXLNRTL4TAHWOQUDWPQUEO5IMZOTYIH7AC
2JZYL7R4OQIZMHTBGZA6HNAC7KLN7DSGZJRE7YILLMTR3WR2XLHAC
2DG7PVTZAJ4NMGY2BNODJRLYTOV3MPTH3V6EZMK3WSIUZESLPQXQC
KWR2TS2D7YN4LCGMQZ35V4WBLQDHAVSZJV3SZAIR5HQRSJAWLWCQC
7MWGEO4D53CRQYELJQJ3PMI3BZJNAJJRX7AESNZ4NMF23XGBFEGAC
7RMAZDLQ6FEEQGUUAIVEM4X2VME7IUUZMEJMMV3H46U3UKO4BODQC
JVO3ABY7VTFBUPUEPNXVSGWLCBJLPDHLSLZJEW2LSEOFUR5Z4RIAC
if (xlib.XQueryExtension)(
display,
CString::new("XInputExtension").unwrap().as_ptr(),
ptr::null_mut(),
ptr::null_mut(),
ptr::null_mut(),
) == xlib::False {
panic!("Failed to query XInputExtension");
let xinput_major_opcode = {
let mut major_opcode = MaybeUninit::uninit();
if (xlib.XQueryExtension)(
display,
CString::new("XInputExtension").unwrap().as_ptr(),
major_opcode.as_mut_ptr(),
ptr::null_mut(),
ptr::null_mut(),
) == xlib::False {
panic!("Failed to query XInputExtension");
};
major_opcode.assume_init()
// FIXME: Check XInput2 extension in cookie.extension
match cookie.evtype {
xinput2::XI_RawMotion => Some(HostEvent::Motion(self.map_raw_motion())),
_ => None,
if cookie.extension == self.xinput_major_opcode {
match cookie.evtype {
xinput2::XI_RawMotion => Some(HostEvent::Motion(self.map_raw_motion())),
_ => None,
}
} else {
None