While developing an AIR application, I had an issue with bringing the application to front (above all other windows) when clicking the systemTrayIcon.
Usually, you would use the method:
systemTrayIcon.addEventListener("click", function() {
window.nativeWindow.orderToFront();
});
But doing so will result in… actually nothing at all. The window doesn’t move.
Using the same code on a menu item of the SystemTrayIcon will work, but not on the click action of the Icon itself.
Workaround:
Set the window property alwaysInFront to true and then to false:
systemTrayIcon.addEventListener("click", function() {
window.nativeWindow.alwaysInFront = true;
window.nativeWindow.alwaysInFront = false;
});
Not the way it should be, but it works…