0
votes

I have created an Adobe AIR application with the following properties on the root MXML tag (

alwaysInFront="true"
backgroundAlpha="0" 
contentBackgroundAlpha="0"

and in my descriptor file I have set the intialWindow properties like so:

<systemChrome>none</systemChrome>

        <!-- Whether the window is transparent. Only applicable when systemChrome is none. Optional. Default false. -->
        <transparent>true</transparent>

        <!-- Whether the window is initially visible. Optional. Default false. -->
        <!-- <visible></visible> -->

        <!-- Whether the user can minimize the window. Optional. Default true. -->
        <minimizable>false</minimizable>

        <!-- Whether the user can maximize the window. Optional. Default true. -->
        <maximizable>false</maximizable>

        <!-- Whether the user can resize the window. Optional. Default true. -->
        <resizable>false</resizable>

This should make sure that my application is transparant and does not have any system chrome. I resize my application to be 100% width and 100% height based on the screen width and height. This is working fine. In the bottom right I have a search field. When I click beside the search field (in the transparant area of my app) I am able to click on windows below it. This means my PC keeps on working like it should only that my searchfield is always on top.

When I press the transparent area of my app I click "through" my app meaning it will still be in front but it is not activated anymore. The application which receives the focus (e.g. Google Chrome) is now activated. Working fine...

BUT

Sometimes when my AIR application is not activated it will be automatically activated when I am working in another app (e.g. Google Chrome). It always happens after a mouse click and I am not able to reproduce it! Seems quite randomly so I have no idea what is causing it. The application activate handler on WindowedApplication is called in this case.

So possible scenario's are:

1) The AIR application is deactivated but when I click on a transparent part for some reason the application gets activated even though I am using another application (e.g. Google Chrome)

2) The other application (e.g. Google Chrome) loses focus for some reason and the AIR application (being the topmost application) gets focus and is activated automatically by the OS, when I click now I am clicking inside my own application and transparancy is ignored

3) ..

Anyone any clues? Reproduced on MacOS

1

1 Answers

1
votes

I've had similar issues building a multi-window app. I think it's caused by the size of your initial window. That area sometimes still receives clicks even after the window has been closed.

I set the initial window size to 10x10 and am resizing to fullscreen on launch. This resolved it on OSX. I did set the size in the swf meta tag, haven't tried setting the values in the app descriptor xml.

Hope this helps.