🐛 debug windows
This commit is contained in:
@@ -24,7 +24,7 @@ pub fn set_system_tray(app: &AppHandle) -> tauri::Result<()> {
|
|||||||
}
|
}
|
||||||
"quit" => {
|
"quit" => {
|
||||||
let _res = app.save_window_state(StateFlags::all());
|
let _res = app.save_window_state(StateFlags::all());
|
||||||
app.get_webview_window("pake").unwrap().close().unwrap();
|
std::process::exit(0);
|
||||||
}
|
}
|
||||||
_ => (),
|
_ => (),
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -102,11 +102,9 @@ pub fn run_app() {
|
|||||||
Ok(())
|
Ok(())
|
||||||
})
|
})
|
||||||
.on_window_event(|window, event| {
|
.on_window_event(|window, event| {
|
||||||
|
#[cfg(target_os = "macos")]
|
||||||
if let tauri::WindowEvent::CloseRequested { api, .. } = event {
|
if let tauri::WindowEvent::CloseRequested { api, .. } = event {
|
||||||
let window = window.clone();
|
let window = window.clone();
|
||||||
api.prevent_close();
|
|
||||||
|
|
||||||
#[cfg(target_os = "macos")]
|
|
||||||
{
|
{
|
||||||
tauri::async_runtime::spawn(async move {
|
tauri::async_runtime::spawn(async move {
|
||||||
if window.is_fullscreen().unwrap_or(false) {
|
if window.is_fullscreen().unwrap_or(false) {
|
||||||
@@ -118,9 +116,7 @@ pub fn run_app() {
|
|||||||
window.hide().unwrap();
|
window.hide().unwrap();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
api.prevent_close();
|
||||||
#[cfg(not(target_os = "macos"))]
|
|
||||||
std::process::exit(0);
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.run(tauri::generate_context!())
|
.run(tauri::generate_context!())
|
||||||
|
|||||||
Reference in New Issue
Block a user