• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: What causes CGEventTap to be automatically disabled?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: What causes CGEventTap to be automatically disabled?


  • Subject: Re: What causes CGEventTap to be automatically disabled?
  • From: Bill Cheeseman <email@hidden>
  • Date: Thu, 21 Oct 2010 15:47:11 -0400

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@hidden

_______________________________________________

Cocoa-dev mailing list (email@hidden)

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:

This email sent to email@hidden

References: 
 >What causes CGEventTap to be automatically disabled? (From: eveningnick eveningnick <email@hidden>)

  • Prev by Date: What causes CGEventTap to be automatically disabled?
  • Next by Date: malloc_error_break
  • Previous by thread: What causes CGEventTap to be automatically disabled?
  • Next by thread: malloc_error_break
  • Index(es):
    • Date
    • Thread