aboutsummaryrefslogtreecommitdiff
path: root/games/veloren-weekly/files/patch-keyboard-keynames
blob: 10f126ce6f724d28c1aa180c86a9b88b30127785 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
Assume X11/Wayland key names on every Unix-like system

--- ../keyboard-keynames-veloren-winit-0.28-fca4bbdfa51bf054b155a455935b3792975c989d/Cargo.toml.orig	2023-08-23 04:01:46 UTC
+++ ../keyboard-keynames-veloren-winit-0.28-fca4bbdfa51bf054b155a455935b3792975c989d/Cargo.toml
@@ -18,7 +18,7 @@ winapi = { version = "0.3.9", features = ["winuser"] }
 [target.'cfg(windows)'.dependencies]
 winapi = { version = "0.3.9", features = ["winuser"] }
 
-[target.'cfg(target_os = "linux")'.dependencies]
+[target.'cfg(all(unix, not(target_os = "macos")))'.dependencies]
 xkbcommon = { version = "0.5", features = ["x11", "wayland"] }
 xcb = { version = "1", features = ["as-raw-xcb-connection"] }
 wayland-client = "0.29"
--- ../keyboard-keynames-veloren-winit-0.28-fca4bbdfa51bf054b155a455935b3792975c989d/src/platform/mod.rs.orig	2023-08-23 04:01:46 UTC
+++ ../keyboard-keynames-veloren-winit-0.28-fca4bbdfa51bf054b155a455935b3792975c989d/src/platform/mod.rs
@@ -1,5 +1,5 @@
 //! The KeyLayout struct and supporting elements
-#[cfg(target_os = "linux")]
+#[cfg(all(unix, not(target_os = "macos")))]
 #[path = "unix/mod.rs"]
 mod platform;
 
@@ -7,7 +7,7 @@ mod platform;
 #[path = "windows/mod.rs"]
 mod platform;
 
-#[cfg(not(any(target_os = "windows", target_os = "linux")))]
+#[cfg(target_os = "macos")]
 #[path = "other/mod.rs"]
 mod platform;
 
--- ../keyboard-keynames-veloren-winit-0.28-fca4bbdfa51bf054b155a455935b3792975c989d/src/platform/unix/key_layout.rs.orig	2023-08-23 04:01:46 UTC
+++ ../keyboard-keynames-veloren-winit-0.28-fca4bbdfa51bf054b155a455935b3792975c989d/src/platform/unix/key_layout.rs
@@ -220,7 +220,6 @@ impl KeyLayout {
 }
 
 /// Methods for KeyLayout specific to Unix-based systems
-#[cfg(target_os = "linux")]
 pub trait KeyLayoutExtUnix {
     /// Construct a KeyLayout explicitly using the Wayland protocol
     fn new_wayland() -> Result<KeyLayout, KeyLayoutError>;