improve mac service

This commit is contained in:
rustdesk
2022-04-27 19:21:38 +08:00
parent 33c6095eca
commit bbe902d92e
8 changed files with 68 additions and 35 deletions

View File

@@ -43,15 +43,6 @@ impl ConnectionManager {
senders: HashMap::new(),
};
let cm = Self(Arc::new(RwLock::new(inner)));
#[cfg(target_os = "macos")]
{
let cloned = cm.clone();
*super::macos::SHOULD_OPEN_UNTITLED_FILE_CALLBACK
.lock()
.unwrap() = Some(Box::new(move || {
cloned.call("awake", &make_args!());
}));
}
let cloned = cm.clone();
std::thread::spawn(move || start_ipc(cloned));
cm