0 Replies Latest reply on Feb 11, 2011 3:42 PM by bobremeika

    Stopping the applications main window from activating when a child window is clicked

    bobremeika

      I am building a javascript based AIR application that implements a bastardized growl notifier.  When the the application is minimized or in the background you may be notified of a new message.  This part works great.

       

      The UI calls for an "X" button to close the the notification window.  When I click the "X" the application's main window is activated and brought to the foreground, but the desired behavior is that the main application window stays minimized or backgrounded.  I've tried playing around with preventDefault and stopPropagation on mouse click and mouse down events but this doesn't seem to solve the problem.  I've also tried to hook into the display state changing event on the nativeWindow to see if I could cancel activation events in this scenario but I wasn't able to get that to work.  My last ditch effort was to try and tap into the AIR platform events for mouse click and mouse down, with the rationale that these things are handled in AIR and by the time it gets to the webkit engine, it's already too late, but that didn't seem to work either.

       

      It's completely possible that I'm "missing some mundane detail" and one of these approaches should be sufficient.  I've noticed that TweetDeck has the same problem so I'm wondering, is this just an "AIR thing", possibly a bug, or is this expected?

       

      Any help would be greatly appreciated.  I can post more information and screenshots if my explanation wasn't clear enough.  Thanks for reading.