<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>NGPixel &#187; Adobe AIR</title>
	<atom:link href="http://www.ngpixel.com/category/adobe-air/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.ngpixel.com</link>
	<description>The Development Blog</description>
	<lastBuildDate>Thu, 26 Aug 2010 17:31:08 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>(Adobe Air) Bring a window to front by clicking the systemTrayIcon</title>
		<link>http://www.ngpixel.com/2009/07/06/adobe-air-bring-a-window-to-front-by-clicking-the-systemtrayicon/</link>
		<comments>http://www.ngpixel.com/2009/07/06/adobe-air-bring-a-window-to-front-by-clicking-the-systemtrayicon/#comments</comments>
		<pubDate>Mon, 06 Jul 2009 14:49:39 +0000</pubDate>
		<dc:creator>Nick</dc:creator>
				<category><![CDATA[Adobe AIR]]></category>

		<guid isPermaLink="false">http://www.ngpixel.com/?p=40</guid>
		<description><![CDATA[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&#8230; actually nothing at all. The window doesn&#8217;t move. Using the same code on a menu [...]]]></description>
			<content:encoded><![CDATA[<p>While developing an AIR application, I had an issue with bringing the application to front (above all other windows) when clicking the systemTrayIcon.</p>
<p>Usually, you would use the method:</p>
<pre class="brush:js">systemTrayIcon.addEventListener("click", function() {
window.nativeWindow.orderToFront();
});</pre>
<p>But doing so will result in&#8230; actually nothing at all. The window doesn&#8217;t move.<br />
Using the same code on a menu item of the SystemTrayIcon will work, but not on the click action of the Icon itself.</p>
<p><span style="text-decoration: underline;"><strong>Workaround:</strong></span></p>
<p>Set the window property <strong>alwaysInFront</strong> to true and then to false:</p>
<pre class="brush:js">systemTrayIcon.addEventListener("click", function() {
 window.nativeWindow.alwaysInFront = true;
 window.nativeWindow.alwaysInFront = false;
 });</pre>
<p>Not the way it should be, but it works&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ngpixel.com/2009/07/06/adobe-air-bring-a-window-to-front-by-clicking-the-systemtrayicon/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
