diff --git a/src/server/input_service.rs b/src/server/input_service.rs index dc126be5f..bd2ad9a16 100644 --- a/src/server/input_service.rs +++ b/src/server/input_service.rs @@ -223,7 +223,9 @@ lazy_static::lazy_static! { static ref IS_SERVER: bool = std::env::args().nth(1) == Some("--server".to_owned()); } +#[cfg(target_os = "macos")] static mut VIRTUAL_INPUT_MTX: Mutex<()> = Mutex::new(()); +#[cfg(target_os = "macos")] static mut VIRTUAL_INPUT: Option = None; // First call set_uinput() will create keyboard and mouse clients. @@ -697,6 +699,7 @@ pub fn handle_key(evt: &KeyEvent) { std::thread::sleep(Duration::from_millis(20)); } +#[cfg(target_os = "macos")] #[inline] fn reset_input() { unsafe {