try start tray when a new controlled connection is established for windows flutter

Signed-off-by: 21pages <pages21@163.com>
This commit is contained in:
21pages 2023-09-11 15:19:07 +08:00
parent c254eebea2
commit db0ab2e4a9

View File

@ -1351,6 +1351,12 @@ impl Connection {
log::error!("ipc to connection manager exit: {}", err);
}
});
#[cfg(all(windows, feature = "flutter"))]
std::thread::spawn(|| {
if crate::is_server() && !crate::check_process("--tray", false) {
crate::platform::run_as_user(vec!["--tray"]).ok();
}
});
}
}