From a989e4b7bc84f93143baaf37dfb8f9c8707add4c Mon Sep 17 00:00:00 2001 From: Joshua Granick Date: Mon, 10 Jun 2019 15:17:55 -0700 Subject: [PATCH] Add window.onMove support for AIR (close #1327) --- src/lime/_internal/backend/air/AIRWindow.hx | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/lime/_internal/backend/air/AIRWindow.hx b/src/lime/_internal/backend/air/AIRWindow.hx index 014f5a96f..35cbe64ba 100644 --- a/src/lime/_internal/backend/air/AIRWindow.hx +++ b/src/lime/_internal/backend/air/AIRWindow.hx @@ -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: } }