title: Cocoa: Hiding NSWindow if user is not doing anything
body: <p>I have a status bar OS X application that has a NSWindow which displays a minimal UI. I want the window to hide automatically (may be using NSTimer) if the user is not interacting with the app. </p>
  
  <p>NSWindow can be hidden using orderOut or setVisible methods but how can I make sure that user is not doing anything critical or interacting with the app Or even the app is not doing some UI updates before it is made hidden? </p>
  
  <p>Do I need to override NSWindow?</p>
  
  <p>Any help would be appreciable. </p>