Use BOOL instead of Rust booleans in handle_key_equivalent

This commit is contained in:
Antonio Scandurra 2022-06-17 17:19:18 +02:00
parent 8f6d081de8
commit a35d7c5e15

View file

@ -545,25 +545,25 @@ extern "C" fn handle_key_equivalent(this: &Object, _: Sel, native_event: id) ->
// were released.
if *is_held {
if window_state_borrow.last_fresh_keydown.as_ref() != Some(&keydown) {
return true;
return YES;
}
} else {
window_state_borrow.last_fresh_keydown = Some(keydown);
}
}
_ => return false,
_ => return NO,
}
if let Some(mut callback) = window_state_borrow.event_callback.take() {
drop(window_state_borrow);
let handled = callback(event);
window_state.borrow_mut().event_callback = Some(callback);
handled
handled as BOOL
} else {
false
NO
}
} else {
false
NO
}
}