I have an AIR application with a system tray icon. When clicked it shows and activates the app. This is working as expected when the app is hidden (docked), however if I select another application so my app is in the background clicking on the system tray icon does nothing.
Oddly I also have a contextual menu on the system tray icon, which has an option to restore, this calls the same event handler as ScreenMouseEvent.CLICK, yet works.
I expect it’s something to do with the contextual menu changing the focus, perhaps it’s a bug in how AIR works with the system tray, perhaps it’s just something I’m missing. Would be good to know if that’s the case.
Thanks in advance
Rob
Update based on OP’s input: if you have multiple windows open for the application, use:
If you are not in the main
WindowedApplicationclass, you can use the static propertyNativeApplication.nativeApplicationto get a reference to the singleton object.WindowedApplication.activate()
NativeApplication.activate(window:NativeWindow = null)
livedocs is not clear on why this is happening. It says
activate()activates the underlying native window – one would expect it to be brought to the front when it is activated, but that’s not happening.