refactor: upgrade tauri 2.0

This commit is contained in:
Kevin Yue
2024-11-18 13:27:34 +08:00
parent a641453388
commit 3316fdf722
10 changed files with 1110 additions and 871 deletions

View File

@@ -78,20 +78,20 @@ async fn wmctrl_try_raise_window(title: &str) -> anyhow::Result<ExitStatus> {
}
fn hide_menu(win: &Window) {
let menu_handle = win.menu_handle();
// let menu_handle = win.menu_handle();
tokio::spawn(async move {
loop {
let menu_visible = menu_handle.is_visible().unwrap_or(false);
// tokio::spawn(async move {
// loop {
// let menu_visible = menu_handle.is_visible().unwrap_or(false);
if !menu_visible {
break;
}
// if !menu_visible {
// break;
// }
if menu_visible {
let _ = menu_handle.hide();
tokio::time::sleep(Duration::from_millis(10)).await;
}
}
});
// if menu_visible {
// let _ = menu_handle.hide();
// tokio::time::sleep(Duration::from_millis(10)).await;
// }
// }
// });
}