mirror of
https://github.com/rust-windowing/winit.git
synced 2026-06-27 07:03:15 -04:00
chore: fix ci
This commit is contained in:
5
.github/workflows/ci.yml
vendored
5
.github/workflows/ci.yml
vendored
@@ -111,8 +111,13 @@ jobs:
|
||||
cargo generate-lockfile
|
||||
cargo update -p ahash --precise 0.8.7
|
||||
cargo update -p bumpalo --precise 3.14.0
|
||||
cargo update -p softbuffer --precise 0.4.0
|
||||
cargo update -p objc2-encode --precise 4.0.3
|
||||
cargo update -p orbclient --precise 0.3.47
|
||||
cargo update -p image --precise 0.25.0
|
||||
cargo update -p gethostname@1.1.0 --precise 1.0.2
|
||||
cargo update -p unicode-ident --precise 1.0.10
|
||||
cargo update -p syn --precise 2.0.114
|
||||
|
||||
- name: Install GCC Multilib
|
||||
if: (matrix.platform.os == 'ubuntu-latest') && contains(matrix.platform.target, 'i686')
|
||||
|
||||
@@ -56,7 +56,7 @@ allow = [
|
||||
crate = "android-activity"
|
||||
|
||||
[[bans.build.bypass]]
|
||||
allow-globs = ["ci/*", "githooks/*"]
|
||||
allow-globs = ["ci/*", "githooks/*", "cargo.sh"]
|
||||
crate = "zerocopy"
|
||||
|
||||
[[bans.build.bypass]]
|
||||
|
||||
@@ -621,7 +621,7 @@ pub struct KeyEvent {
|
||||
///
|
||||
/// # Example
|
||||
///
|
||||
/// In games, you often want to ignore repated key events - this can be
|
||||
/// In games, you often want to ignore repeated key events - this can be
|
||||
/// done by ignoring events where this property is set.
|
||||
///
|
||||
/// ```
|
||||
|
||||
@@ -182,7 +182,7 @@
|
||||
#![cfg_attr(clippy, deny(warnings))]
|
||||
// Doc feature labels can be tested locally by running RUSTDOCFLAGS="--cfg=docsrs" cargo +nightly
|
||||
// doc
|
||||
#![cfg_attr(docsrs, feature(doc_auto_cfg, doc_cfg_hide), doc(cfg_hide(doc, docsrs)))]
|
||||
#![cfg_attr(docsrs, feature(doc_cfg), doc(auto_cfg(hide(doc, docsrs))))]
|
||||
#![allow(clippy::missing_safety_doc)]
|
||||
#![warn(clippy::uninlined_format_args)]
|
||||
// TODO: wasm-binding needs to be updated for that to be resolved, for now just silence it.
|
||||
|
||||
@@ -369,8 +369,8 @@ impl WindowState {
|
||||
new_size.height.saturating_sub(self.min_inner_size.height),
|
||||
);
|
||||
|
||||
let width = self.min_inner_size.width
|
||||
+ (delta_width / increments.width) * increments.width;
|
||||
let width =
|
||||
self.min_inner_size.width + (delta_width / increments.width) * increments.width;
|
||||
let height = self.min_inner_size.height
|
||||
+ (delta_height / increments.height) * increments.height;
|
||||
|
||||
|
||||
@@ -81,7 +81,7 @@ extern "C" fn preedit_draw_callback(
|
||||
call_data.chg_first as usize..(call_data.chg_first + call_data.chg_length) as usize;
|
||||
if chg_range.start > client_data.text.len() || chg_range.end > client_data.text.len() {
|
||||
tracing::warn!(
|
||||
"invalid chg range: buffer length={}, but chg_first={} chg_lengthg={}",
|
||||
"invalid chg range: buffer length={}, but chg_first={} chg_length={}",
|
||||
client_data.text.len(),
|
||||
call_data.chg_first,
|
||||
call_data.chg_length
|
||||
@@ -158,7 +158,7 @@ impl PreeditCallbacks {
|
||||
pub fn new(client_data: ffi::XPointer) -> PreeditCallbacks {
|
||||
let start_callback = create_xim_callback(client_data, unsafe {
|
||||
mem::transmute::<usize, unsafe extern "C" fn(ffi::XIM, ffi::XPointer, ffi::XPointer)>(
|
||||
preedit_start_callback as usize,
|
||||
preedit_start_callback as *const () as usize,
|
||||
)
|
||||
});
|
||||
let done_callback = create_xim_callback(client_data, preedit_done_callback);
|
||||
|
||||
@@ -51,10 +51,9 @@ impl ImeInner {
|
||||
}
|
||||
|
||||
pub unsafe fn close_im_if_necessary(&self) -> Result<bool, XError> {
|
||||
if !self.is_destroyed && self.im.is_some() {
|
||||
unsafe { close_im(&self.xconn, self.im.as_ref().unwrap().im) }.map(|_| true)
|
||||
} else {
|
||||
Ok(false)
|
||||
match self.im.as_ref() {
|
||||
Some(im) if !self.is_destroyed => unsafe { close_im(&self.xconn, im.im).map(|_| true) },
|
||||
_ => Ok(false),
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -128,7 +128,7 @@ pub(crate) fn create_key_event(ns_event: &NSEvent, is_press: bool, is_repeat: bo
|
||||
|
||||
let logical_key = match text_with_all_modifiers.as_ref() {
|
||||
// Only checking for ctrl and cmd here, not checking for alt because we DO want to
|
||||
// include its effect in the key. For example if -on the Germay layout- one
|
||||
// include its effect in the key. For example if -on the German layout- one
|
||||
// presses alt+8, the logical key should be "{"
|
||||
// Also not checking if this is a release event because then this issue would
|
||||
// still affect the key release.
|
||||
|
||||
@@ -2641,7 +2641,7 @@ unsafe fn handle_raw_input(userdata: &ThreadMsgTargetData, data: RAWINPUT) {
|
||||
}
|
||||
|
||||
enum PointerMoveKind {
|
||||
/// Pointer enterd to the window.
|
||||
/// Pointer entered to the window.
|
||||
Enter,
|
||||
/// Pointer leaved the window client area.
|
||||
Leave,
|
||||
|
||||
@@ -1824,10 +1824,11 @@ pub enum WindowLevel {
|
||||
/// ## Platform-specific
|
||||
///
|
||||
/// - **iOS / Android / Web / Windows / X11 / macOS / Orbital:** Unsupported.
|
||||
#[derive(Debug, PartialEq, Eq, Clone, Copy)]
|
||||
#[derive(Default, Debug, PartialEq, Eq, Clone, Copy)]
|
||||
#[non_exhaustive]
|
||||
pub enum ImePurpose {
|
||||
/// No special hints for the IME (default).
|
||||
#[default]
|
||||
Normal,
|
||||
/// The IME is used for password input.
|
||||
Password,
|
||||
@@ -1837,12 +1838,6 @@ pub enum ImePurpose {
|
||||
Terminal,
|
||||
}
|
||||
|
||||
impl Default for ImePurpose {
|
||||
fn default() -> Self {
|
||||
Self::Normal
|
||||
}
|
||||
}
|
||||
|
||||
/// An opaque token used to activate the [`Window`].
|
||||
///
|
||||
/// [`Window`]: crate::window::Window
|
||||
|
||||
Reference in New Issue
Block a user