Skip to content

Commit

Permalink
fix macos
Browse files Browse the repository at this point in the history
  • Loading branch information
amrbashir committed Apr 23, 2024
1 parent 5e0e1d7 commit 52dbff4
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions src/platform_impl/macos/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ use cocoa::{
use keyboard_types::{Code, Modifiers};
use objc::{class, msg_send, sel, sel_impl};
use std::{
cell::RefCell,
collections::{BTreeMap, HashSet},
ffi::c_void,
ptr,
Expand Down Expand Up @@ -43,12 +42,6 @@ pub struct GlobalHotKeyManager {
media_hotkeys: Arc<Mutex<HashSet<HotKey>>>,
}

impl Drop for GlobalHotKeyManager {
fn drop(&mut self) {
self.stop_watching_media_keys()
}
}

unsafe impl Send for GlobalHotKeyManager {}
unsafe impl Sync for GlobalHotKeyManager {}

Expand Down Expand Up @@ -337,6 +330,7 @@ impl Drop for GlobalHotKeyManager {
unsafe {
RemoveEventHandler(self.event_handler_ptr);
}
self.stop_watching_media_keys()
}
}

Expand Down

0 comments on commit 52dbff4

Please sign in to comment.