Add window.onMove support for AIR (close #1327)
This commit is contained in:
@@ -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:
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user