title: Getting the main window of an app via an NSRunningApplication instance
body: <p>I'm observing NSWorkspaceDidDeactivateApplicationNotification notification to get the application that has just lost focus. I'm ending up with an instance of NSRunningApplication which you get from the userInfo dictionary key - NSWorkspaceApplicationKey - of the notification object.</p>
  
  <p>I was thinking that I'd be able to get the main window from the app from the notification but I'm not sure where to go from here as NSRunningApplication seems to pretty limited. Any help would be appreciated.</p>
  
  <p>BTW - I'm using MacRuby but the answer doesn't need to be in MacRuby.</p>
  
  <p>Thanks</p>