On Oct 21, 2010, at 3:31 PM, eveningnick eveningnick wrote:

> In some moments i find out (using application ET Testbench) that my
> active event tap is disabled (when i have not called CGDisableEventTap
> nowhere!).  I am pretty sure, i am not calling
> CGEventTapEnable(myactivetap, NO) nowhere else, except when my app
> finishes.
> 
> What could cause that behavior?


The event taps documentation ("Quartz Event Services Reference," if I recall 
correctly) explains that the system automatically disables an event tap 
whenever the system determines that the event tap is slowing the system down. 
When this happens, you receive a special notification, and from the 
notification you can tell whether the event tap was disabled by the user or by 
the system. Your program should normally respond to the system disabled event 
by re-enabling the event tap, but other strategies are possible.

Any software that makes use of event taps should include a routine to watch for 
the system disabled event, so that you can re-enable the event tap immediately 
and avoid losing functionality.

--

Bill Cheeseman - [email protected]

_______________________________________________

Cocoa-dev mailing list ([email protected])

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to