Add window.onMove support for AIR (close #1327)

This commit is contained in:
Joshua Granick
2019-06-10 15:17:55 -07:00
parent bb76d37073
commit a989e4b7bc

View File

@@ -6,6 +6,7 @@ import flash.display.NativeWindowInitOptions;
import flash.display.NativeWindowRenderMode;
import flash.display.NativeWindowSystemChrome;
import flash.events.Event;
import flash.events.NativeWindowBoundsEvent;
import flash.html.HTMLLoader;
import flash.Lib;
import lime._internal.backend.flash.FlashApplication;
@@ -123,6 +124,7 @@ class AIRWindow extends FlashWindow
nativeWindow.addEventListener(Event.CLOSING, handleNativeWindowEvent);
nativeWindow.addEventListener(Event.CLOSE, handleNativeWindowEvent);
// nativeWindow.addEventListener (Event.RESIZE, handleWindowEvent);
nativeWindow.addEventListener(NativeWindowBoundsEvent.MOVE, handleNativeWindowEvent);
nativeWindow.visible = !hidden;
// nativeWindow.activate ();
@@ -200,6 +202,10 @@ class AIRWindow extends FlashWindow
// parent.onResize.dispatch (parent.__width, parent.__height);
case NativeWindowBoundsEvent.MOVE:
parent.onMove.dispatch(nativeWindow.x, nativeWindow.y);
default:
}
}