From 7fa74811e8e9708dc2af304f2c663c30a23d9c62 Mon Sep 17 00:00:00 2001 From: Ferdinand Schober Date: Fri, 18 Jul 2025 17:58:28 +0200 Subject: [PATCH] update core-graphics --- input-capture/src/macos.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/input-capture/src/macos.rs b/input-capture/src/macos.rs index 026a06b..a7f03f7 100644 --- a/input-capture/src/macos.rs +++ b/input-capture/src/macos.rs @@ -10,7 +10,7 @@ use core_graphics::base::{kCGErrorSuccess, CGError}; use core_graphics::display::{CGDisplay, CGPoint}; use core_graphics::event::{ CGEvent, CGEventFlags, CGEventTap, CGEventTapLocation, CGEventTapOptions, CGEventTapPlacement, - CGEventTapProxy, CGEventType, EventField, + CGEventTapProxy, CGEventType, CallbackResult, EventField, }; use core_graphics::event_source::{CGEventSource, CGEventSourceStateID}; use futures_core::Stream; @@ -394,11 +394,11 @@ fn create_event_tap<'a>( // may already be closed when the InputCapture instance is dropped. let _ = event_tx.blocking_send((pos, *e)); }); - // Returning None should stop the event from being processed + // Returning Drop should stop the event from being processed // but core fundation still returns the event cg_ev.set_type(CGEventType::Null); } - Some(cg_ev.to_owned()) + CallbackResult::Replace(cg_ev.to_owned()) }; let tap = CGEventTap::new( @@ -411,7 +411,7 @@ fn create_event_tap<'a>( .map_err(|_| MacosCaptureCreationError::EventTapCreation)?; let tap_source: CFRunLoopSource = tap - .mach_port + .mach_port() .create_runloop_source(0) .expect("Failed creating loop source");