0

I am looking for a notification or callback that is similar to NSWorkspaceDidHideApplicationNotification for when a user chooses "Hide Others" in any running application. I was wondering if anyone knows of an api or has some advice in detecting the "Hide Others" action in any application.

Justin Boo
  • 10,132
  • 8
  • 50
  • 71
  • 1
    I'd have to ponder a bit on that, but I'm fascinated about what the use case is for this. What are you trying to do? – Rob Napier Jun 13 '11 at 20:53
  • I dont think there is a notification for it, It seems kind of un-Mac to care about things that are happening in unrelated applications. – Grady Player Jun 13 '11 at 21:16
  • having said that, you get the applicationWillHide:, as josh stated, and you can intercept the hideOtherApplications: event in your responder chain, that will tell you when your active application is asked to hide other applications. – Grady Player Jun 13 '11 at 21:19

1 Answers1

2

Your app delegate gets applicationWillHide: and applicationDidHide: whenever your application hides, no matter what caused it.

jscs
  • 63,694
  • 13
  • 151
  • 195