From 57b2f3c11c4094fcde9458b1daffbcada52e8a9e Mon Sep 17 00:00:00 2001 From: Blinc <65546512+Blinc13@users.noreply.github.com> Date: Thu, 29 Dec 2022 21:23:59 +0300 Subject: [PATCH 1/2] Wayland permission fix - update keyboard-keynames --- Cargo.lock | 361 +++++++++++++++++++++++++++++++++++++----- voxygen/Cargo.toml | 2 +- voxygen/src/window.rs | 33 +++- 3 files changed, 350 insertions(+), 46 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 0ec17a5cf6..ffd0f9ef60 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -594,6 +594,19 @@ dependencies = [ "nix 0.18.0", ] +[[package]] +name = "calloop" +version = "0.10.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a59225be45a478d772ce015d9743e49e92798ece9e34eda9a6aa2a6a7f40192" +dependencies = [ + "log", + "nix 0.25.1", + "slotmap 1.0.6", + "thiserror", + "vec_map", +] + [[package]] name = "cassowary" version = "0.3.0" @@ -859,7 +872,7 @@ dependencies = [ "cocoa-foundation", "core-foundation 0.9.3", "core-graphics 0.22.3", - "foreign-types", + "foreign-types 0.3.2", "libc", "objc", ] @@ -874,7 +887,7 @@ dependencies = [ "block", "core-foundation 0.9.3", "core-graphics-types", - "foreign-types", + "foreign-types 0.3.2", "libc", "objc", ] @@ -1041,7 +1054,7 @@ checksum = "b3889374e6ea6ab25dba90bb5d96202f61108058361f6dc72e8b03e6f8bbe923" dependencies = [ "bitflags", "core-foundation 0.7.0", - "foreign-types", + "foreign-types 0.3.2", "libc", ] @@ -1054,7 +1067,7 @@ dependencies = [ "bitflags", "core-foundation 0.9.3", "core-graphics-types", - "foreign-types", + "foreign-types 0.3.2", "libc", ] @@ -1066,7 +1079,19 @@ checksum = "3a68b68b3446082644c91ac778bf50cd4104bfb002b5a6a7c44cca5a2c70788b" dependencies = [ "bitflags", "core-foundation 0.9.3", - "foreign-types", + "foreign-types 0.3.2", + "libc", +] + +[[package]] +name = "core-text" +version = "19.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "99d74ada66e07c1cefa18f8abfba765b486f250de2e4a999e5727fc0dd4b4a25" +dependencies = [ + "core-foundation 0.9.3", + "core-graphics 0.22.3", + "foreign-types 0.3.2", "libc", ] @@ -1398,6 +1423,29 @@ dependencies = [ "once_cell", ] +[[package]] +name = "crossfont" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "21fd3add36ea31aba1520aa5288714dd63be506106753226d0eb387a93bc9c45" +dependencies = [ + "cocoa", + "core-foundation 0.9.3", + "core-foundation-sys 0.8.3", + "core-graphics 0.22.3", + "core-text", + "dwrote", + "foreign-types 0.5.0", + "freetype-rs", + "libc", + "log", + "objc", + "once_cell", + "pkg-config", + "servo-fontconfig", + "winapi 0.3.9", +] + [[package]] name = "crossterm" version = "0.17.7" @@ -1746,6 +1794,20 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2c4a817d8b683f6e649aed359aab0c47a875377516bb5791d0f7e46d9066d209" +[[package]] +name = "dwrote" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "439a1c2ba5611ad3ed731280541d36d2e9c4ac5e7fb818a27b604bdc5a6aa65b" +dependencies = [ + "lazy_static", + "libc", + "serde", + "serde_derive", + "winapi 0.3.9", + "wio", +] + [[package]] name = "egui" version = "0.12.0" @@ -1772,7 +1834,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cd4cf17c0cd4dbcf2f8fef55a3592b9b7cfd970576c7302d8ba5c521b8560371" dependencies = [ "egui", - "winit", + "winit 0.25.0", ] [[package]] @@ -1951,6 +2013,16 @@ version = "2.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0206175f82b8d6bf6652ff7d71a1e27fd2e4efde587fd368662814d6ec1d9ce0" +[[package]] +name = "expat-sys" +version = "2.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "658f19728920138342f68408b7cf7644d90d4784353d8ebc32e7e8663dbe45fa" +dependencies = [ + "cmake", + "pkg-config", +] + [[package]] name = "fallible-iterator" version = "0.2.0" @@ -2111,7 +2183,28 @@ version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1" dependencies = [ - "foreign-types-shared", + "foreign-types-shared 0.1.1", +] + +[[package]] +name = "foreign-types" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d737d9aa519fb7b749cbc3b962edcf310a8dd1f4b67c91c4f83975dbdd17d965" +dependencies = [ + "foreign-types-macros", + "foreign-types-shared 0.3.1", +] + +[[package]] +name = "foreign-types-macros" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c8469d0d40519bc608ec6863f1cc88f3f1deee15913f2f3b3e573d81ed38cccc" +dependencies = [ + "proc-macro2 1.0.43", + "quote 1.0.21", + "syn 1.0.100", ] [[package]] @@ -2120,6 +2213,12 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" +[[package]] +name = "foreign-types-shared" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aa9a19cbb55df58761df49b23516a86d432839add4af60fc256da840f66ed35b" + [[package]] name = "form_urlencoded" version = "1.1.0" @@ -2129,6 +2228,28 @@ dependencies = [ "percent-encoding", ] +[[package]] +name = "freetype-rs" +version = "0.26.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "74eadec9d0a5c28c54bb9882e54787275152a4e36ce206b45d7451384e5bf5fb" +dependencies = [ + "bitflags", + "freetype-sys", + "libc", +] + +[[package]] +name = "freetype-sys" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a37d4011c0cc628dfa766fcc195454f4b068d7afdc2adfd28861191d866e731a" +dependencies = [ + "cmake", + "libc", + "pkg-config", +] + [[package]] name = "fsevent-sys" version = "4.1.0" @@ -2411,7 +2532,7 @@ dependencies = [ "block", "cocoa-foundation", "copyless", - "foreign-types", + "foreign-types 0.3.2", "fxhash", "gfx-auxil", "gfx-hal", @@ -2928,7 +3049,7 @@ dependencies = [ "thiserror", "winapi 0.3.9", "window_clipboard", - "winit", + "winit 0.25.0", ] [[package]] @@ -3133,16 +3254,14 @@ dependencies = [ [[package]] name = "keyboard-keynames" -version = "0.1.0" -source = "git+https://gitlab.com/Frinksy/keyboard-keynames.git?branch=develop#1ae010ca032a57dfe0ba01d4346a3b03bde36de0" +version = "0.1.1" +source = "git+https://gitlab.com/Frinksy/keyboard-keynames.git?branch=master#143e985f6e078c604801a1064c14f755962dc18c" dependencies = [ - "libc", - "memmap", - "wayland-client 0.28.6", + "wayland-client 0.29.5", "winapi 0.3.9", - "winit", - "xcb 0.9.0", - "xkbcommon-sys", + "winit 0.27.5", + "xcb 1.2.0", + "xkbcommon", ] [[package]] @@ -3422,16 +3541,6 @@ version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d" -[[package]] -name = "memmap" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6585fd95e7bb50d6cc31e20d4cf9afb4e2ba16c5846fc76793f11218da9c475b" -dependencies = [ - "libc", - "winapi 0.3.9", -] - [[package]] name = "memmap2" version = "0.1.0" @@ -3477,7 +3586,7 @@ dependencies = [ "bitflags", "block", "cocoa-foundation", - "foreign-types", + "foreign-types 0.3.2", "log", "objc", ] @@ -3729,6 +3838,22 @@ dependencies = [ "ndk-sys 0.3.0", ] +[[package]] +name = "ndk-glue" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0434fabdd2c15e0aab768ca31d5b7b333717f03cf02037d5a0a3ff3c278ed67f" +dependencies = [ + "libc", + "log", + "ndk 0.7.0", + "ndk-context", + "ndk-macro 0.3.0", + "ndk-sys 0.4.0", + "once_cell", + "parking_lot 0.12.0", +] + [[package]] name = "ndk-macro" version = "0.2.0" @@ -3860,6 +3985,7 @@ dependencies = [ "bitflags", "cfg-if 1.0.0", "libc", + "memoffset 0.6.5", ] [[package]] @@ -5435,6 +5561,15 @@ version = "1.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4501abdff3ae82a1c1b477a17252eb69cee9e66eb915c1abaa4f44d873df9f09" +[[package]] +name = "safe_arch" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c1ff3d6d9696af502cc3110dacce942840fb06ff4514cad92236ecc455f2ce05" +dependencies = [ + "bytemuck", +] + [[package]] name = "same-file" version = "1.0.6" @@ -5486,6 +5621,18 @@ dependencies = [ "untrusted", ] +[[package]] +name = "sctk-adwaita" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "61270629cc6b4d77ec1907db1033d5c2e1a404c412743621981a871dc9c12339" +dependencies = [ + "crossfont", + "log", + "smithay-client-toolkit 0.16.0", + "tiny-skia", +] + [[package]] name = "sdl2" version = "0.35.2" @@ -5628,6 +5775,27 @@ dependencies = [ "syn 1.0.100", ] +[[package]] +name = "servo-fontconfig" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c7e3e22fe5fd73d04ebf0daa049d3efe3eae55369ce38ab16d07ddd9ac5c217c" +dependencies = [ + "libc", + "servo-fontconfig-sys", +] + +[[package]] +name = "servo-fontconfig-sys" +version = "5.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e36b879db9892dfa40f95da1c38a835d41634b825fbd8c4c418093d53c24b388" +dependencies = [ + "expat-sys", + "freetype-sys", + "pkg-config", +] + [[package]] name = "sha2" version = "0.10.6" @@ -5806,7 +5974,7 @@ checksum = "4750c76fd5d3ac95fa3ed80fe667d6a3d8590a960e5b575b98eea93339a80b80" dependencies = [ "andrew", "bitflags", - "calloop", + "calloop 0.6.5", "dlib 0.4.2", "lazy_static", "log", @@ -5824,6 +5992,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f307c47d32d2715eb2e0ece5589057820e0e5e70d07c247d1063e844e107f454" dependencies = [ "bitflags", + "calloop 0.10.5", "dlib 0.5.0", "lazy_static", "log", @@ -6197,6 +6366,31 @@ dependencies = [ "crunchy", ] +[[package]] +name = "tiny-skia" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "642680569bb895b16e4b9d181c60be1ed136fa0c9c7f11d004daf053ba89bf82" +dependencies = [ + "arrayref", + "arrayvec 0.5.2", + "bytemuck", + "cfg-if 1.0.0", + "png", + "safe_arch", + "tiny-skia-path", +] + +[[package]] +name = "tiny-skia-path" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c114d32f0c2ee43d585367cb013dfaba967ab9f62b90d9af0d696e955e70fa6c" +dependencies = [ + "arrayref", + "bytemuck", +] + [[package]] name = "tinystr" version = "0.3.4" @@ -7119,7 +7313,7 @@ dependencies = [ "wgpu", "wgpu-profiler", "window_clipboard", - "winit", + "winit 0.25.0", "winres", ] @@ -7976,6 +8170,19 @@ dependencies = [ "windows_x86_64_msvc 0.34.0", ] +[[package]] +name = "windows-sys" +version = "0.36.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ea04155a16a59f9eab786fe12a4a450e75cdb175f9e0d80da1e17db09f55b8d2" +dependencies = [ + "windows_aarch64_msvc 0.36.1", + "windows_i686_gnu 0.36.1", + "windows_i686_msvc 0.36.1", + "windows_x86_64_gnu 0.36.1", + "windows_x86_64_msvc 0.36.1", +] + [[package]] name = "windows_aarch64_gnullvm" version = "0.42.0" @@ -7994,6 +8201,12 @@ version = "0.34.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "17cffbe740121affb56fad0fc0e421804adf0ae00891205213b5cecd30db881d" +[[package]] +name = "windows_aarch64_msvc" +version = "0.36.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9bb8c3fd39ade2d67e9874ac4f3db21f0d710bee00fe7cab16949ec184eeaa47" + [[package]] name = "windows_aarch64_msvc" version = "0.37.0" @@ -8018,6 +8231,12 @@ version = "0.34.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2564fde759adb79129d9b4f54be42b32c89970c18ebf93124ca8870a498688ed" +[[package]] +name = "windows_i686_gnu" +version = "0.36.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "180e6ccf01daf4c426b846dfc66db1fc518f074baa793aa7d9b9aaeffad6a3b6" + [[package]] name = "windows_i686_gnu" version = "0.37.0" @@ -8042,6 +8261,12 @@ version = "0.34.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9cd9d32ba70453522332c14d38814bceeb747d80b3958676007acadd7e166956" +[[package]] +name = "windows_i686_msvc" +version = "0.36.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e2e7917148b2812d1eeafaeb22a97e4813dfa60a3f8f78ebe204bcc88f12f024" + [[package]] name = "windows_i686_msvc" version = "0.37.0" @@ -8066,6 +8291,12 @@ version = "0.34.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cfce6deae227ee8d356d19effc141a509cc503dfd1f850622ec4b0f84428e1f4" +[[package]] +name = "windows_x86_64_gnu" +version = "0.36.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4dcd171b8776c41b97521e5da127a2d86ad280114807d0b2ab1e462bc764d9e1" + [[package]] name = "windows_x86_64_gnu" version = "0.37.0" @@ -8096,6 +8327,12 @@ version = "0.34.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d19538ccc21819d01deaf88d6a17eae6596a12e9aafdbb97916fb49896d89de9" +[[package]] +name = "windows_x86_64_msvc" +version = "0.36.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c811ca4a8c853ef420abd8592ba53ddbbac90410fab6903b3e79972a631f7680" + [[package]] name = "windows_x86_64_msvc" version = "0.37.0" @@ -8141,6 +8378,39 @@ dependencies = [ "x11-dl", ] +[[package]] +name = "winit" +version = "0.27.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bb796d6fbd86b2fd896c9471e6f04d39d750076ebe5680a3958f00f5ab97657c" +dependencies = [ + "bitflags", + "cocoa", + "core-foundation 0.9.3", + "core-graphics 0.22.3", + "dispatch 0.2.0", + "instant", + "libc", + "log", + "mio 0.8.2", + "ndk 0.7.0", + "ndk-glue 0.7.0", + "objc", + "once_cell", + "parking_lot 0.12.0", + "percent-encoding", + "raw-window-handle 0.4.3", + "raw-window-handle 0.5.0", + "sctk-adwaita", + "smithay-client-toolkit 0.16.0", + "wasm-bindgen", + "wayland-client 0.29.5", + "wayland-protocols 0.29.5", + "web-sys", + "windows-sys 0.36.1", + "x11-dl", +] + [[package]] name = "winreg" version = "0.10.1" @@ -8218,16 +8488,6 @@ dependencies = [ "libc", ] -[[package]] -name = "xcb" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62056f63138b39116f82a540c983cc11f1c90cd70b3d492a70c25eaa50bd22a6" -dependencies = [ - "libc", - "log", -] - [[package]] name = "xcb" version = "0.10.1" @@ -8239,6 +8499,17 @@ dependencies = [ "quick-xml", ] +[[package]] +name = "xcb" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0faeb4d7e2d54fff4a0584f61297e86b106914af2029778de7b427f72564d6c5" +dependencies = [ + "bitflags", + "libc", + "quick-xml", +] + [[package]] name = "xcursor" version = "0.3.4" @@ -8264,12 +8535,14 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a67300977d3dc3f8034dae89778f502b6ba20b269527b3223ba59c0cf393bb8a" [[package]] -name = "xkbcommon-sys" -version = "0.7.6" -source = "git+https://github.com/Frinksy/rust-xkbcommon-sys.git?rev=8f615dd6cd90a4ab77c45627830dde49b592b9b5#8f615dd6cd90a4ab77c45627830dde49b592b9b5" +name = "xkbcommon" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "acbee136714379ab22da0280207fdb7f47e0bb940adea97731b65598b8c7a92e" dependencies = [ "libc", - "pkg-config", + "memmap2 0.5.7", + "xcb 1.2.0", ] [[package]] diff --git a/voxygen/Cargo.toml b/voxygen/Cargo.toml index 6090035710..c3cd03be0d 100644 --- a/voxygen/Cargo.toml +++ b/voxygen/Cargo.toml @@ -75,7 +75,7 @@ iced = {package = "iced_native", git = "https://github.com/Imberflur/iced", tag iced_winit = {git = "https://github.com/Imberflur/iced", tag = "winit-0.25"} window_clipboard = "0.2" glyph_brush = "0.7.0" -keyboard-keynames = { git = "https://gitlab.com/Frinksy/keyboard-keynames.git", branch = "develop" } +keyboard-keynames = "0.1.1" # EGUI egui = {version = "0.12", optional = true } diff --git a/voxygen/src/window.rs b/voxygen/src/window.rs index fd1e62ae04..316be39d4b 100644 --- a/voxygen/src/window.rs +++ b/voxygen/src/window.rs @@ -469,7 +469,7 @@ impl Window { let scale_factor = window.scale_factor(); - let key_layout = match KeyLayout::new_from_window(&window) { + let key_layout = match init_keylayout_from_window(&window) { Ok(kl) => Some(kl), Err(err) => { warn!( @@ -1390,3 +1390,34 @@ impl Default for FullScreenSettings { } } } + + +use keyboard_keynames::errors::KeyLayoutError; + +fn init_keylayout_from_window(_window: &winit::window::Window) -> Result { + #[cfg(target_family = "unix")] + { + use winit::platform::unix::WindowExtUnix; + use keyboard_keynames::key_layout::KeyLayoutExtUnix; + + match _window.xcb_connection() { + Some(_) => KeyLayout::new_x11(), + None => KeyLayout::new_wayland() + } + } + + #[cfg(target_family = "windows")] + { + Ok(KeyLayout {}) + } + + #[cfg( + all( + not(target_family = "unix"), + not(target_family = "windows") + ) + )] + { + Err(KeyLayoutError::PlatformUnsupportedError) + } +} \ No newline at end of file From 0c10b8ca0811f6578dee5958268d4b6219fd32ac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcel=20M=C3=A4rtens?= Date: Mon, 2 Jan 2023 12:43:03 +0100 Subject: [PATCH 2/2] fix Cargo.lock and fmt --- Cargo.lock | 313 +++--------------------------------------- voxygen/Cargo.toml | 2 +- voxygen/src/window.rs | 18 +-- 3 files changed, 24 insertions(+), 309 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index ffd0f9ef60..239b657024 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -594,19 +594,6 @@ dependencies = [ "nix 0.18.0", ] -[[package]] -name = "calloop" -version = "0.10.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a59225be45a478d772ce015d9743e49e92798ece9e34eda9a6aa2a6a7f40192" -dependencies = [ - "log", - "nix 0.25.1", - "slotmap 1.0.6", - "thiserror", - "vec_map", -] - [[package]] name = "cassowary" version = "0.3.0" @@ -872,7 +859,7 @@ dependencies = [ "cocoa-foundation", "core-foundation 0.9.3", "core-graphics 0.22.3", - "foreign-types 0.3.2", + "foreign-types", "libc", "objc", ] @@ -887,7 +874,7 @@ dependencies = [ "block", "core-foundation 0.9.3", "core-graphics-types", - "foreign-types 0.3.2", + "foreign-types", "libc", "objc", ] @@ -1054,7 +1041,7 @@ checksum = "b3889374e6ea6ab25dba90bb5d96202f61108058361f6dc72e8b03e6f8bbe923" dependencies = [ "bitflags", "core-foundation 0.7.0", - "foreign-types 0.3.2", + "foreign-types", "libc", ] @@ -1067,7 +1054,7 @@ dependencies = [ "bitflags", "core-foundation 0.9.3", "core-graphics-types", - "foreign-types 0.3.2", + "foreign-types", "libc", ] @@ -1079,19 +1066,7 @@ checksum = "3a68b68b3446082644c91ac778bf50cd4104bfb002b5a6a7c44cca5a2c70788b" dependencies = [ "bitflags", "core-foundation 0.9.3", - "foreign-types 0.3.2", - "libc", -] - -[[package]] -name = "core-text" -version = "19.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "99d74ada66e07c1cefa18f8abfba765b486f250de2e4a999e5727fc0dd4b4a25" -dependencies = [ - "core-foundation 0.9.3", - "core-graphics 0.22.3", - "foreign-types 0.3.2", + "foreign-types", "libc", ] @@ -1423,29 +1398,6 @@ dependencies = [ "once_cell", ] -[[package]] -name = "crossfont" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "21fd3add36ea31aba1520aa5288714dd63be506106753226d0eb387a93bc9c45" -dependencies = [ - "cocoa", - "core-foundation 0.9.3", - "core-foundation-sys 0.8.3", - "core-graphics 0.22.3", - "core-text", - "dwrote", - "foreign-types 0.5.0", - "freetype-rs", - "libc", - "log", - "objc", - "once_cell", - "pkg-config", - "servo-fontconfig", - "winapi 0.3.9", -] - [[package]] name = "crossterm" version = "0.17.7" @@ -1794,20 +1746,6 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2c4a817d8b683f6e649aed359aab0c47a875377516bb5791d0f7e46d9066d209" -[[package]] -name = "dwrote" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "439a1c2ba5611ad3ed731280541d36d2e9c4ac5e7fb818a27b604bdc5a6aa65b" -dependencies = [ - "lazy_static", - "libc", - "serde", - "serde_derive", - "winapi 0.3.9", - "wio", -] - [[package]] name = "egui" version = "0.12.0" @@ -1834,7 +1772,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cd4cf17c0cd4dbcf2f8fef55a3592b9b7cfd970576c7302d8ba5c521b8560371" dependencies = [ "egui", - "winit 0.25.0", + "winit", ] [[package]] @@ -2013,16 +1951,6 @@ version = "2.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0206175f82b8d6bf6652ff7d71a1e27fd2e4efde587fd368662814d6ec1d9ce0" -[[package]] -name = "expat-sys" -version = "2.1.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "658f19728920138342f68408b7cf7644d90d4784353d8ebc32e7e8663dbe45fa" -dependencies = [ - "cmake", - "pkg-config", -] - [[package]] name = "fallible-iterator" version = "0.2.0" @@ -2183,28 +2111,7 @@ version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1" dependencies = [ - "foreign-types-shared 0.1.1", -] - -[[package]] -name = "foreign-types" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d737d9aa519fb7b749cbc3b962edcf310a8dd1f4b67c91c4f83975dbdd17d965" -dependencies = [ - "foreign-types-macros", - "foreign-types-shared 0.3.1", -] - -[[package]] -name = "foreign-types-macros" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c8469d0d40519bc608ec6863f1cc88f3f1deee15913f2f3b3e573d81ed38cccc" -dependencies = [ - "proc-macro2 1.0.43", - "quote 1.0.21", - "syn 1.0.100", + "foreign-types-shared", ] [[package]] @@ -2213,12 +2120,6 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" -[[package]] -name = "foreign-types-shared" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aa9a19cbb55df58761df49b23516a86d432839add4af60fc256da840f66ed35b" - [[package]] name = "form_urlencoded" version = "1.1.0" @@ -2228,28 +2129,6 @@ dependencies = [ "percent-encoding", ] -[[package]] -name = "freetype-rs" -version = "0.26.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "74eadec9d0a5c28c54bb9882e54787275152a4e36ce206b45d7451384e5bf5fb" -dependencies = [ - "bitflags", - "freetype-sys", - "libc", -] - -[[package]] -name = "freetype-sys" -version = "0.13.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a37d4011c0cc628dfa766fcc195454f4b068d7afdc2adfd28861191d866e731a" -dependencies = [ - "cmake", - "libc", - "pkg-config", -] - [[package]] name = "fsevent-sys" version = "4.1.0" @@ -2532,7 +2411,7 @@ dependencies = [ "block", "cocoa-foundation", "copyless", - "foreign-types 0.3.2", + "foreign-types", "fxhash", "gfx-auxil", "gfx-hal", @@ -3049,7 +2928,7 @@ dependencies = [ "thiserror", "winapi 0.3.9", "window_clipboard", - "winit 0.25.0", + "winit", ] [[package]] @@ -3254,12 +3133,13 @@ dependencies = [ [[package]] name = "keyboard-keynames" -version = "0.1.1" -source = "git+https://gitlab.com/Frinksy/keyboard-keynames.git?branch=master#143e985f6e078c604801a1064c14f755962dc18c" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f32e85d306d31d33240ea15accdf6e153d0a31da1409a21a0d5fb7ca5ef91d6c" dependencies = [ "wayland-client 0.29.5", "winapi 0.3.9", - "winit 0.27.5", + "winit", "xcb 1.2.0", "xkbcommon", ] @@ -3586,7 +3466,7 @@ dependencies = [ "bitflags", "block", "cocoa-foundation", - "foreign-types 0.3.2", + "foreign-types", "log", "objc", ] @@ -3838,22 +3718,6 @@ dependencies = [ "ndk-sys 0.3.0", ] -[[package]] -name = "ndk-glue" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0434fabdd2c15e0aab768ca31d5b7b333717f03cf02037d5a0a3ff3c278ed67f" -dependencies = [ - "libc", - "log", - "ndk 0.7.0", - "ndk-context", - "ndk-macro 0.3.0", - "ndk-sys 0.4.0", - "once_cell", - "parking_lot 0.12.0", -] - [[package]] name = "ndk-macro" version = "0.2.0" @@ -3985,7 +3849,6 @@ dependencies = [ "bitflags", "cfg-if 1.0.0", "libc", - "memoffset 0.6.5", ] [[package]] @@ -5561,15 +5424,6 @@ version = "1.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4501abdff3ae82a1c1b477a17252eb69cee9e66eb915c1abaa4f44d873df9f09" -[[package]] -name = "safe_arch" -version = "0.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1ff3d6d9696af502cc3110dacce942840fb06ff4514cad92236ecc455f2ce05" -dependencies = [ - "bytemuck", -] - [[package]] name = "same-file" version = "1.0.6" @@ -5621,18 +5475,6 @@ dependencies = [ "untrusted", ] -[[package]] -name = "sctk-adwaita" -version = "0.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61270629cc6b4d77ec1907db1033d5c2e1a404c412743621981a871dc9c12339" -dependencies = [ - "crossfont", - "log", - "smithay-client-toolkit 0.16.0", - "tiny-skia", -] - [[package]] name = "sdl2" version = "0.35.2" @@ -5775,27 +5617,6 @@ dependencies = [ "syn 1.0.100", ] -[[package]] -name = "servo-fontconfig" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c7e3e22fe5fd73d04ebf0daa049d3efe3eae55369ce38ab16d07ddd9ac5c217c" -dependencies = [ - "libc", - "servo-fontconfig-sys", -] - -[[package]] -name = "servo-fontconfig-sys" -version = "5.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e36b879db9892dfa40f95da1c38a835d41634b825fbd8c4c418093d53c24b388" -dependencies = [ - "expat-sys", - "freetype-sys", - "pkg-config", -] - [[package]] name = "sha2" version = "0.10.6" @@ -5974,7 +5795,7 @@ checksum = "4750c76fd5d3ac95fa3ed80fe667d6a3d8590a960e5b575b98eea93339a80b80" dependencies = [ "andrew", "bitflags", - "calloop 0.6.5", + "calloop", "dlib 0.4.2", "lazy_static", "log", @@ -5992,7 +5813,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f307c47d32d2715eb2e0ece5589057820e0e5e70d07c247d1063e844e107f454" dependencies = [ "bitflags", - "calloop 0.10.5", "dlib 0.5.0", "lazy_static", "log", @@ -6366,31 +6186,6 @@ dependencies = [ "crunchy", ] -[[package]] -name = "tiny-skia" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "642680569bb895b16e4b9d181c60be1ed136fa0c9c7f11d004daf053ba89bf82" -dependencies = [ - "arrayref", - "arrayvec 0.5.2", - "bytemuck", - "cfg-if 1.0.0", - "png", - "safe_arch", - "tiny-skia-path", -] - -[[package]] -name = "tiny-skia-path" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c114d32f0c2ee43d585367cb013dfaba967ab9f62b90d9af0d696e955e70fa6c" -dependencies = [ - "arrayref", - "bytemuck", -] - [[package]] name = "tinystr" version = "0.3.4" @@ -7313,7 +7108,7 @@ dependencies = [ "wgpu", "wgpu-profiler", "window_clipboard", - "winit 0.25.0", + "winit", "winres", ] @@ -8170,19 +7965,6 @@ dependencies = [ "windows_x86_64_msvc 0.34.0", ] -[[package]] -name = "windows-sys" -version = "0.36.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea04155a16a59f9eab786fe12a4a450e75cdb175f9e0d80da1e17db09f55b8d2" -dependencies = [ - "windows_aarch64_msvc 0.36.1", - "windows_i686_gnu 0.36.1", - "windows_i686_msvc 0.36.1", - "windows_x86_64_gnu 0.36.1", - "windows_x86_64_msvc 0.36.1", -] - [[package]] name = "windows_aarch64_gnullvm" version = "0.42.0" @@ -8201,12 +7983,6 @@ version = "0.34.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "17cffbe740121affb56fad0fc0e421804adf0ae00891205213b5cecd30db881d" -[[package]] -name = "windows_aarch64_msvc" -version = "0.36.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9bb8c3fd39ade2d67e9874ac4f3db21f0d710bee00fe7cab16949ec184eeaa47" - [[package]] name = "windows_aarch64_msvc" version = "0.37.0" @@ -8231,12 +8007,6 @@ version = "0.34.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2564fde759adb79129d9b4f54be42b32c89970c18ebf93124ca8870a498688ed" -[[package]] -name = "windows_i686_gnu" -version = "0.36.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "180e6ccf01daf4c426b846dfc66db1fc518f074baa793aa7d9b9aaeffad6a3b6" - [[package]] name = "windows_i686_gnu" version = "0.37.0" @@ -8261,12 +8031,6 @@ version = "0.34.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9cd9d32ba70453522332c14d38814bceeb747d80b3958676007acadd7e166956" -[[package]] -name = "windows_i686_msvc" -version = "0.36.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2e7917148b2812d1eeafaeb22a97e4813dfa60a3f8f78ebe204bcc88f12f024" - [[package]] name = "windows_i686_msvc" version = "0.37.0" @@ -8291,12 +8055,6 @@ version = "0.34.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cfce6deae227ee8d356d19effc141a509cc503dfd1f850622ec4b0f84428e1f4" -[[package]] -name = "windows_x86_64_gnu" -version = "0.36.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4dcd171b8776c41b97521e5da127a2d86ad280114807d0b2ab1e462bc764d9e1" - [[package]] name = "windows_x86_64_gnu" version = "0.37.0" @@ -8327,12 +8085,6 @@ version = "0.34.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d19538ccc21819d01deaf88d6a17eae6596a12e9aafdbb97916fb49896d89de9" -[[package]] -name = "windows_x86_64_msvc" -version = "0.36.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c811ca4a8c853ef420abd8592ba53ddbbac90410fab6903b3e79972a631f7680" - [[package]] name = "windows_x86_64_msvc" version = "0.37.0" @@ -8378,39 +8130,6 @@ dependencies = [ "x11-dl", ] -[[package]] -name = "winit" -version = "0.27.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb796d6fbd86b2fd896c9471e6f04d39d750076ebe5680a3958f00f5ab97657c" -dependencies = [ - "bitflags", - "cocoa", - "core-foundation 0.9.3", - "core-graphics 0.22.3", - "dispatch 0.2.0", - "instant", - "libc", - "log", - "mio 0.8.2", - "ndk 0.7.0", - "ndk-glue 0.7.0", - "objc", - "once_cell", - "parking_lot 0.12.0", - "percent-encoding", - "raw-window-handle 0.4.3", - "raw-window-handle 0.5.0", - "sctk-adwaita", - "smithay-client-toolkit 0.16.0", - "wasm-bindgen", - "wayland-client 0.29.5", - "wayland-protocols 0.29.5", - "web-sys", - "windows-sys 0.36.1", - "x11-dl", -] - [[package]] name = "winreg" version = "0.10.1" diff --git a/voxygen/Cargo.toml b/voxygen/Cargo.toml index c3cd03be0d..b55c50526e 100644 --- a/voxygen/Cargo.toml +++ b/voxygen/Cargo.toml @@ -75,7 +75,7 @@ iced = {package = "iced_native", git = "https://github.com/Imberflur/iced", tag iced_winit = {git = "https://github.com/Imberflur/iced", tag = "winit-0.25"} window_clipboard = "0.2" glyph_brush = "0.7.0" -keyboard-keynames = "0.1.1" +keyboard-keynames = "0.1.2" # EGUI egui = {version = "0.12", optional = true } diff --git a/voxygen/src/window.rs b/voxygen/src/window.rs index 316be39d4b..8173151180 100644 --- a/voxygen/src/window.rs +++ b/voxygen/src/window.rs @@ -1391,18 +1391,19 @@ impl Default for FullScreenSettings { } } - use keyboard_keynames::errors::KeyLayoutError; -fn init_keylayout_from_window(_window: &winit::window::Window) -> Result { +fn init_keylayout_from_window( + _window: &winit::window::Window, +) -> Result { #[cfg(target_family = "unix")] { - use winit::platform::unix::WindowExtUnix; use keyboard_keynames::key_layout::KeyLayoutExtUnix; + use winit::platform::unix::WindowExtUnix; match _window.xcb_connection() { Some(_) => KeyLayout::new_x11(), - None => KeyLayout::new_wayland() + None => KeyLayout::new_wayland(), } } @@ -1411,13 +1412,8 @@ fn init_keylayout_from_window(_window: &winit::window::Window) -> Result