When launching an AIR desktop build of Tetragon the position and size of it’s main window will automatically be stored and recalled the next time the application is launched. Additionally the system chrome extra width and height are being calculated and the stage size is adjusted accordingly.
The reason for the extra width/height calculation is that the stage size of an AIR desktop application comprises the width and height of the system chrome which means that you typically end up with a smaller stage size than expected. To that problem adds that the system chrome can have different sizes depending on the OS and the visual theme. To solve this problem Tetragon calculates the size difference and adjusts the stage size accordingly during startup. Imagine you define your application stage size to be 640 x 400. By default your stage size on web builds would still be 640 x 400 but on desktop builds (that use the system chrome) the actual stage size would be smaller because the whole window incl. the chrome would be 640 x 400. But thanks to Tetragon’s adjustment the AIR stage size will remain 640 x 400 and not 630someting x 380something. This is great because you don’t have to fumble around with this issue.
However there is a pitfall to be aware of: Be sure to set your AIR window minSizes to something large enough that can handle your application’s default width and height! By default Tetragon’s build properties set the AIR window minSizes to the same as the default sizes so it will work correctly but be wary if you change the minSizes! Setting these to anything below the default sizes will give you wrong window sizes and not only that, the window size will grow with each launch.
If you want to reset the window bounds to it’s defaults, Tetragon provides a console command to do just that. Open Tetragon’s console and type in resetwinbounds (or the shortcut rwb) and the position and size of the window will be reset.
Ultimately there might be situations where you want to remove the file where window bounds are stored. This file is a Local Shared Object residing in the application’s application storage directory. On Windows this path is for example:
After removing this file the application’s window will be reset to it’s default bounds at the next launch. Keep in mind however that, depending on the application, the window bounds might not be the only data the sol file stores.