flutter deal with --tray

Signed-off-by: 21pages <pages21@163.com>
This commit is contained in:
21pages 2022-10-29 21:59:45 +08:00
parent a06753bbdd
commit 07f23d8a54
2 changed files with 3 additions and 5 deletions

View File

@ -135,6 +135,9 @@ pub fn core_main() -> Option<Vec<String>> {
#[cfg(feature = "with_rc")]
hbb_common::allow_err!(crate::rc::extract_resources(&args[1]));
return None;
} else if args[0] == "--tray" {
crate::tray::start_tray(crate::ui_interface::OPTIONS.clone());
return None;
}
}
if args[0] == "--remove" {

View File

@ -89,11 +89,6 @@ pub fn start(args: &mut [String]) {
unsafe {
winapi::um::shellscalingapi::SetProcessDpiAwareness(2);
}
#[cfg(windows)]
if args.len() > 0 && args[0] == "--tray" {
crate::tray::start_tray(crate::ui_interface::OPTIONS.clone());
return;
}
use sciter::SCRIPT_RUNTIME_FEATURES::*;
allow_err!(sciter::set_options(sciter::RuntimeOptions::ScriptFeatures(
ALLOW_FILE_IO as u8 | ALLOW_SOCKET_IO as u8 | ALLOW_EVAL as u8 | ALLOW_SYSINFO as u8