Air bug? minHeight/minWidth

I have experienced something that could be a bug (feature?).

For example, if you set a window’s x position to 100 differs if you have specified a minWidth. Somehow i think the registration point changes.

This method corrects the bad positioning of the window:

  1. import flash.display.Screen;
  2. import mx.core.Window;
  3. public function fixPositioning(win:Window):void{
  4. win.nativeWindow.x += (win.nativeWindow.x * 1.5) + (Screen.mainScreen.visibleBounds.width * 0.5);
  5. }

It’s the same for the y positioning.

Any explanation as of why this happens is greatly appreciated :)

BTW, it happens with NativeWindow instances not only with Window’s.

—fernando