fix: set_activation_policy

This commit is contained in:
GyDi 2022-10-10 22:15:21 +08:00
parent ec94218a4b
commit f2bd6f1fce
No known key found for this signature in database
GPG Key ID: 58B15242BA8277A6

View File

@ -145,10 +145,14 @@ fn main() -> std::io::Result<()> {
builder = builder.menu(Menu::new().add_submenu(submenu_file));
}
let app = builder
#[allow(unused_mut)]
let mut app = builder
.build(context)
.expect("error while running tauri application");
#[cfg(target_os = "macos")]
app.set_activation_policy(tauri::ActivationPolicy::Accessory);
let app_handle = app.app_handle();
ctrlc::set_handler(move || {
resolve::resolve_reset();