[NUI] Call show winodw on ApplicationInit
authorhuiyu.eun <huiyu.eun@samsung.com>
Fri, 11 Dec 2020 01:23:54 +0000 (10:23 +0900)
committerdongsug-song <35130733+dongsug-song@users.noreply.github.com>
Fri, 11 Dec 2020 01:47:00 +0000 (10:47 +0900)
- When preload application, the show is called before the appcore is created.
- Call the window show at OnInit and notify the app core

Signed-off-by: huiyu.eun <huiyu.eun@samsung.com>
src/Tizen.NUI/src/internal/Application.cs
src/Tizen.NUI/src/public/NUIApplication.cs

index 498553a..6a109af 100755 (executable)
@@ -620,6 +620,12 @@ namespace Tizen.NUI
             // Initialize DisposeQueue Singleton class. This is also required to create DisposeQueue on main thread.
             DisposeQueue.Instance.Initialize();
 
+            // Notify that the window is displayed to the app core.
+            if (NUIApplication.IsPreLoad)
+            {
+                Window.Instance.Show();
+            }
+
             if (_applicationInitEventHandler != null)
             {
                 NUIApplicationInitEventArgs e = new NUIApplicationInitEventArgs();
index a716327..3b96f6a 100755 (executable)
@@ -41,6 +41,7 @@ namespace Tizen.NUI
         private Position2D _windowPosition2D = null;
         private TransitionOptions transitionOptions;
 
+        private static bool isPreLoad = false;
 
         /// <summary>
         /// The default constructor.
@@ -385,6 +386,7 @@ namespace Tizen.NUI
         {
             Interop.Application.Application_PreInitialize();
             ThemeManager.EnsureDefaultTheme();
+            isPreLoad = true;
         }
 
         /// <summary>
@@ -411,6 +413,17 @@ namespace Tizen.NUI
                 transitionOptions = value;
             }
         }
+
+        /// <summary>
+        /// Check if it is loaded as dotnet-loader-nui.
+        /// </summary>
+        static internal bool IsPreLoad
+        {
+            get
+            {
+                return isPreLoad;
+            }
+        }
     }
 
     /// <summary>