hide-tray option

This commit is contained in:
rustdesk committed 2024-08-07 01:08:36 +08:00
1 parent 96edca8f74
commit 2f432e941d
8 files changed
+26 -13

No files matched your search

+10
View File
@@ -9,6 +9,16 @@ use std::sync::{Arc, Mutex};
use std::time::Duration;
pub fn start_tray() {
if crate::ui_interface::get_builtin_option(hbb_common::config::keys::OPTION_HIDE_TRAY) == "Y" {
if cfg!(target_os = "macos") {
crate::platform::macos::hide_dock();
loop {
std::thread::sleep(std::time::Duration::from_secs(1));
}
} else {
return;
}
}
allow_err!(make_tray());
}