mirror of
https://github.com/feschber/lan-mouse.git
synced 2026-03-07 20:09:59 +03:00
macos: fix memory leak
probably should use an AutoreleasePool as well
This commit is contained in:
@@ -453,8 +453,10 @@ fn create_event_tap<'a>(
|
|||||||
// Returning Drop should stop the event from being processed
|
// Returning Drop should stop the event from being processed
|
||||||
// but core fundation still returns the event
|
// but core fundation still returns the event
|
||||||
cg_ev.set_type(CGEventType::Null);
|
cg_ev.set_type(CGEventType::Null);
|
||||||
|
CallbackResult::Drop
|
||||||
|
} else {
|
||||||
|
CallbackResult::Keep
|
||||||
}
|
}
|
||||||
CallbackResult::Replace(cg_ev.to_owned())
|
|
||||||
};
|
};
|
||||||
|
|
||||||
let tap = CGEventTap::new(
|
let tap = CGEventTap::new(
|
||||||
|
|||||||
Reference in New Issue
Block a user