mirror of
https://github.com/rustdesk/rustdesk.git
synced 2026-03-29 08:01:03 +03:00
hide-tray option
This commit is contained in:
10
src/tray.rs
10
src/tray.rs
@@ -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());
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user