From 38efbd5a17dd4e19df98d20072ccd3622f0e8a7d Mon Sep 17 00:00:00 2001 From: fufesou Date: Thu, 15 Dec 2022 23:10:57 +0800 Subject: [PATCH] linux remove some warns Signed-off-by: fufesou --- src/keyboard.rs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/keyboard.rs b/src/keyboard.rs index edd03d6e6..cfd1453f6 100644 --- a/src/keyboard.rs +++ b/src/keyboard.rs @@ -7,19 +7,19 @@ use crate::flutter::FlutterHandler; use crate::ui::remote::SciterHandler; use crate::ui_session_interface::Session; use hbb_common::{log, message_proto::*}; -#[cfg(target_os = "linux")] -use rdev::GrabError; use rdev::{Event, EventType, Key}; +#[cfg(any(target_os = "windows", target_os = "macos"))] +use std::sync::atomic::{AtomicBool, Ordering}; use std::{ collections::{HashMap, HashSet}, - sync::{ - atomic::{AtomicBool, Ordering}, - Arc, Mutex, - }, + sync::{Arc, Mutex}, time::SystemTime, }; +#[cfg(windows)] static mut IS_ALT_GR: bool = false; + +#[cfg(any(target_os = "windows", target_os = "macos"))] static KEYBOARD_HOOKED: AtomicBool = AtomicBool::new(false); #[cfg(feature = "flutter")]