This looks like a logical mistake in the code. The events logic is the following:
pub(crate) unsafe fn resolve_event(
event: *mut xcb_generic_event_t,
extension_data: &[ExtensionData],
) -> Event {
let response_type = (*event).response_type & 0x7F;
if response_type == XCB_GE_GENERIC {
// Special handler for GE_GENERIC
}
for data in extension_data {
if response_type >= data.first_event && data.first_event != 0 {
// Handle extensions here
}
}
x::Event::resolve_wire_event(0, event) // CRASH HERE
We can either refactor resolve_event to avoid going into resolve_wire_event if the first check passes. Or we can simply remove the debug assert. The resolve_wire_event will gracefully return None in this case.resolve_wire_event
Closes #257
This looks like a logical mistake in the code. The events logic is the following:
We can either refactor
resolve_event
to avoid going intoresolve_wire_event
if the first check passes. Or we can simply remove the debug assert. Theresolve_wire_event
will gracefully returnNone
in this case.resolve_wire_event