Re: losing focus momentarily, over and over again
Re: losing focus momentarily, over and over again
- Subject: Re: losing focus momentarily, over and over again
- From: Michael Ash <email@hidden>
- Date: Thu, 7 May 2009 22:59:38 -0400
On Thu, May 7, 2009 at 2:41 PM, Bill Janssen <email@hidden> wrote:
> I'm guessing that some other app I'm running, probably in this
> background process (programs like GNU "enscript", and "ghostscript",
> but also like "sips", to create custom Finder icons), is stealing the
> focus. Or maybe System Events is doing it. How? Why? Is there any
> way I can prevent this from happening?
You're in the best position to answer your own question here. You can
write some code that monitors for kEventAppFrontSwitched events and
prints out the frontmost app every time it changes. Then make your
problem happen, and see what's stealing focus.
"kEventAppFrontSwitched" is a Carbon event and its use may not be
obvious if you aren't familiar with Carbon, but if you search on that
term you should find example code.
Mike
_______________________________________________
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