mirror of
https://github.com/weyne85/rustdesk.git
synced 2025-10-29 17:00:05 +00:00
fix, separate window, event stream leak
Signed-off-by: dignow <linlong1265@gmail.com>
This commit is contained in:
@@ -52,6 +52,9 @@ lazy_static::lazy_static! {
|
||||
|
||||
pub mod client {
|
||||
use super::*;
|
||||
lazy_static::lazy_static! {
|
||||
static ref IS_GRAB_STARTED: Arc<Mutex<bool>> = Arc::new(Mutex::new(false));
|
||||
}
|
||||
|
||||
pub fn get_keyboard_mode() -> String {
|
||||
#[cfg(not(any(feature = "flutter", feature = "cli")))]
|
||||
@@ -70,7 +73,12 @@ pub mod client {
|
||||
}
|
||||
|
||||
pub fn start_grab_loop() {
|
||||
let mut lock = IS_GRAB_STARTED.lock().unwrap();
|
||||
if *lock {
|
||||
return;
|
||||
}
|
||||
super::start_grab_loop();
|
||||
*lock = true;
|
||||
}
|
||||
|
||||
#[cfg(not(any(target_os = "android", target_os = "ios")))]
|
||||
|
||||
Reference in New Issue
Block a user