Cocoa Accessibility API consuming mouse clicks

334 views Asked by At

I have encountered a weird problem with one of my OS X apps. The app uses AXAPI to create event taps and to monitor keyboard and mouse events. Some users with OS 10.6-10.7 report that when the app is active, their mouse doesn't function correctly - they have to click twice or more, otherwise system doesn't see the click at all.

When these users switched off AXAPI, the problem disappeared.

The weird thing is that I have never encountered this problem on development computers, nor did the testers. Yet around 10% of reporting users have experienced it.

I use active event tap at HID level and I also handle mouse events, but I never return NULL from callback.

The problem is almost certanly in AXAPI, but I can't understand where exactly it is.

1

There are 1 answers

0
ivanmoskalev On BEST ANSWER

Eventually I switched to filtering Mouse Events with a separate passive EventTap. The problem disappeared after the update of the app, but there was also a minor OS X update around that time, so I can't actually tell what fixed the bug.

Josh, thank you for your idea anyway.