I have an AIR application running on Mac OS X. The application sometimes pops up little toaster windows to indicate certain events.
The problem I have is that when a user "hides" the application (cmd-h on Mac), those toaster windows cause all windows in the application to come to the foreground. I'm opening the toaster window without focus by calling:
toasterWindow.open(false)
Is there a way I can either:
- Make the toaster windows to not cause all the other windows in the application to come to the foreground. Perhaps there's a special option when creating/opening the window?
- Detect the cmd-h event (keyDown doesn't fire, since it's a built-in OS shortcut). If I could do this, I could probably manually hide the application window to prevent it from automatically showing up when another window is opened.
Currently, my only option is to not show toasters when someone hides the application (I check the 'visible' property of the window before deciding whether to display a toaster window). Ideally, my goal is to have toaster notifications display for someone who has hidden the application.
Incidentally, I'm working in Flex, but I think the AIR APIs are equivalent for flex/flash/javascript