Trying the examples on a Linux machine s390x (big endian), I got errors upon cargo run --example window:
2021-03-11 16:14:17,387 ERROR [winit::platform_impl::platform] X11 error: XError {
description: "BadValue (integer parameter out of range for operation)",
error_code: 2,
request_code: 132,
minor_code: 46,
}
This is, I think, because select_xinput_events() deconstructs mask: i32 to an array of bytes (see here). This leads to wrong results on a big endian machine.
Putting mask: &mask.to_le_bytes() as *const _ as *mut c_uchar, the examples seem to work fine. But this is probably a very hacky solution, as I haven't thought very hard about possible consequences.
Trying the examples on a Linux machine s390x (big endian), I got errors upon
cargo run --example window:This is, I think, because
select_xinput_events()deconstructsmask: i32to an array of bytes (see here). This leads to wrong results on a big endian machine.Putting
mask: &mask.to_le_bytes() as *const _ as *mut c_uchar, the examples seem to work fine. But this is probably a very hacky solution, as I haven't thought very hard about possible consequences.