servo / core-foundation-rs

Rust bindings to Core Foundation and other low level libraries on Mac OS X and iOS
Other
987 stars 216 forks source link

Incorrect behavior of CGEventTap #664

Open adamnemecek opened 5 months ago

adamnemecek commented 5 months ago

I believes that the behavior of CGEventTap is not correct.

https://github.com/servo/core-foundation-rs/blob/d7879eb353ed04503c99237c3dd22a5652bbf745/core-graphics/src/event.rs#L437

I think that if the callback returns NULL, the event is supposed to be cancelled

https://developer.apple.com/documentation/coregraphics/cgeventtapcallback?language=objc