fix: mac commad+q global hijack is not released

This commit is contained in:
huzibaca 2024-10-20 06:06:47 +08:00
parent a47ded7cf2
commit 199700cf09
No known key found for this signature in database
GPG Key ID: D4364EE4851DC302

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"));