fix: mac commad+q global hijack is not released

This commit is contained in:
huzibaca 2024-10-20 06:06:47 +08:00
parent aa31fb7470
commit 6f477b7147

View File

@ -158,7 +158,7 @@ pub fn run() {
log_err!(hotkey::Hotkey::global().register("Control+Q", "quit")); log_err!(hotkey::Hotkey::global().register("Control+Q", "quit"));
}; };
} }
tauri::WindowEvent::Focused(false) => { tauri::WindowEvent::Destroyed => {
#[cfg(target_os = "macos")] #[cfg(target_os = "macos")]
{ {
log_err!(hotkey::Hotkey::global().unregister("CMD+Q")); log_err!(hotkey::Hotkey::global().unregister("CMD+Q"));