hide-tray option

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

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());
}