From 8f61ad319c0ea914378921892fb7119849c657c3 Mon Sep 17 00:00:00 2001 From: Jupeyy Date: Sun, 5 Jan 2025 15:36:36 +0100 Subject: [PATCH] Update winit Remove workaround --- Cargo.lock | 6 +++--- lib/hiarc/Cargo.toml | 2 +- lib/input-binds/Cargo.toml | 2 +- lib/native/Cargo.toml | 2 +- lib/native/src/native/winit_wrapper.rs | 8 -------- 5 files changed, 6 insertions(+), 14 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index b20791f..56304cb 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -7556,7 +7556,7 @@ dependencies = [ "once_cell", "socket2", "tracing", - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] @@ -11359,9 +11359,9 @@ checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" [[package]] name = "winit" -version = "0.30.7" +version = "0.30.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dba50bc8ef4b6f1a75c9274fb95aa9a8f63fbc66c56f391bd85cf68d51e7b1a3" +checksum = "f5d74280aabb958072864bff6cfbcf9025cf8bfacdde5e32b5e12920ef703b0f" dependencies = [ "ahash 0.8.11", "android-activity", diff --git a/lib/hiarc/Cargo.toml b/lib/hiarc/Cargo.toml index 9af4b2a..d344371 100644 --- a/lib/hiarc/Cargo.toml +++ b/lib/hiarc/Cargo.toml @@ -28,7 +28,7 @@ rustc-hash = { version = "2.1.0", default-features = false, optional = true } crossbeam = { version = "0.8.4", default-features = false, optional = true } ash = { version = "0.38.0", default-features = false, optional = true } chrono = { version = "0.4.39", default-features = false, optional = true } -winit = { version = "0.30.7", default-features = false, optional = true } +winit = { version = "0.30.8", default-features = false, optional = true } [features] derive = ["hiarc-macro"] diff --git a/lib/input-binds/Cargo.toml b/lib/input-binds/Cargo.toml index c45a920..fa1561a 100644 --- a/lib/input-binds/Cargo.toml +++ b/lib/input-binds/Cargo.toml @@ -8,7 +8,7 @@ base = { path = "../base" } pool = { path = "../pool" } hiarc = { path = "../hiarc", features = ["enable_winit"] } serde = { version = "1.0.217", features = ["derive"] } -winit = { version = "0.30.7", default-features = false, features = ["serde"] } +winit = { version = "0.30.8", default-features = false, features = ["serde"] } [dev-dependencies] serde_json = "1.0.134" diff --git a/lib/native/Cargo.toml b/lib/native/Cargo.toml index a774641..aa2ed99 100644 --- a/lib/native/Cargo.toml +++ b/lib/native/Cargo.toml @@ -10,6 +10,6 @@ native-display = { path = "../native-display" } anyhow = { version = "1.0.95", features = ["backtrace"] } raw-window-handle = "0.6.2" log = "0.4.22" -winit = { version = "0.30.7", default-features = false, features = ["serde", "rwh_06", "android-native-activity", "x11", "wayland"] } +winit = { version = "0.30.8", default-features = false, features = ["serde", "rwh_06", "android-native-activity", "x11", "wayland"] } diff --git a/lib/native/src/native/winit_wrapper.rs b/lib/native/src/native/winit_wrapper.rs index 034f0cf..3517ceb 100644 --- a/lib/native/src/native/winit_wrapper.rs +++ b/lib/native/src/native/winit_wrapper.rs @@ -75,14 +75,6 @@ impl WindowMouse { internal_events.insert(InternalEvent::MouseGrabWrong); } } - #[cfg(target_os = "linux")] - if matches!(err, ExternalError::NotSupported(_)) { - // workaround for an x11 bug - // https://github.com/rust-windowing/winit/issues/4064 - // fixed by https://github.com/rust-windowing/winit/pull/4065 - let _ = window.set_cursor_grab(CursorGrabMode::None); - let _ = window.set_cursor_grab(self.last_mouse_mode); - } false } }