Is there any way to detect when an app is no longer active? That is, listen for changes to this:
[NSApp isActive]
Is there any way to detect when an app is no longer active? That is, listen for changes to this:
[NSApp isActive]
In your app delegate, implement your choice of -applicationDidResignActive: or -applicationWillResignActive:.
Alternately, listen for the NSApplicationDidResignActiveNotification or NSApplicationWillResignActiveNotification notifications on NSApp.