You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@royale.apache.org by ah...@apache.org on 2019/11/12 19:14:01 UTC

[royale-asjs] branch develop updated: second attempt to get resize working. Should fix #556

This is an automated email from the ASF dual-hosted git repository.

aharui pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/royale-asjs.git


The following commit(s) were added to refs/heads/develop by this push:
     new 3a2c4a8  second attempt to get resize working.  Should fix #556
3a2c4a8 is described below

commit 3a2c4a83acbd49ba4713f59544ed87d97c743ce0
Author: Alex Harui <ah...@apache.org>
AuthorDate: Tue Nov 12 11:13:48 2019 -0800

    second attempt to get resize working.  Should fix #556
---
 .../projects/MXRoyale/src/main/royale/mx/core/Application.as      | 8 +++++++-
 .../MXRoyale/src/main/royale/mx/managers/SystemManager.as         | 1 +
 2 files changed, 8 insertions(+), 1 deletion(-)

diff --git a/frameworks/projects/MXRoyale/src/main/royale/mx/core/Application.as b/frameworks/projects/MXRoyale/src/main/royale/mx/core/Application.as
index 6527c71..2e79aec 100644
--- a/frameworks/projects/MXRoyale/src/main/royale/mx/core/Application.as
+++ b/frameworks/projects/MXRoyale/src/main/royale/mx/core/Application.as
@@ -585,11 +585,17 @@ public class Application extends Container implements IStrand, IParent, IEventDi
 	COMPILE::JS
 	protected var startupTimer:Timer;
 	
+    private var _started:Boolean = false;
+    
     COMPILE::JS
     override public function setActualSize(w:Number, h:Number):void
     {
         super.setActualSize(w, h);
-        start();
+        if (!_started)
+        {
+            start();
+            _started = true;
+        }
     }
     
 	/**
diff --git a/frameworks/projects/MXRoyale/src/main/royale/mx/managers/SystemManager.as b/frameworks/projects/MXRoyale/src/main/royale/mx/managers/SystemManager.as
index 86a853b..d5ff2a1 100644
--- a/frameworks/projects/MXRoyale/src/main/royale/mx/managers/SystemManager.as
+++ b/frameworks/projects/MXRoyale/src/main/royale/mx/managers/SystemManager.as
@@ -2999,6 +2999,7 @@ public class SystemManager extends SystemManagerBase implements ISystemManager,
      */
     private function resizeHandler(event:Event):void
     {
+        _screen = null;
         var screen:Rectangle = this.screen;
         mxmlDocument.setActualSize(screen.width, screen.height);        
     }