mirror of
https://github.com/feschber/lan-mouse.git
synced 2026-05-21 06:45:38 -06:00
macos: fix a crash when InputCapture is dropped (#323)
This commit is contained in:
parent
e46fe60b3e
commit
e29eb7134c
1 changed files with 3 additions and 3 deletions
|
|
@ -390,9 +390,9 @@ fn create_event_tap<'a>(
|
||||||
|
|
||||||
if let Some(pos) = pos {
|
if let Some(pos) = pos {
|
||||||
res_events.iter().for_each(|e| {
|
res_events.iter().for_each(|e| {
|
||||||
event_tx
|
// error must be ignored, since the event channel
|
||||||
.blocking_send((pos, *e))
|
// may already be closed when the InputCapture instance is dropped.
|
||||||
.expect("Failed to send event");
|
let _ = event_tx.blocking_send((pos, *e));
|
||||||
});
|
});
|
||||||
// Returning None should stop the event from being processed
|
// Returning None should stop the event from being processed
|
||||||
// but core fundation still returns the event
|
// but core fundation still returns the event
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue