hide app icon in macos dock without real windows

This commit is contained in:
2026-09-04 20:15:26 +08:00
parent ef8af68398
commit ce07be8d28
7 changed files with 138 additions and 48 deletions
+2 -8
View File
@@ -18,14 +18,8 @@ pub fn init(handle: &AppHandle) {
.title("Friendolls Debug")
.inner_size(800.0, 600.0)
.min_inner_size(500.0, 400.0)
.transparent(true)
.visible(true);
let window = builder.build().unwrap();
let window_c = window.clone();
window.on_window_event(move |event: &tauri::WindowEvent| {
if let tauri::WindowEvent::CloseRequested { api, .. } = event {
api.prevent_close();
window_c.hide().unwrap();
}
});
builder.build().unwrap();
}