From 32a96714397e81be0c2d814f6bc8b58e63c0d235 Mon Sep 17 00:00:00 2001 From: "huiyu.eun" Date: Fri, 11 Dec 2020 10:23:54 +0900 Subject: [PATCH] [NUI] Call show winodw on ApplicationInit - 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 --- src/Tizen.NUI/src/internal/Application.cs | 6 ++++++ src/Tizen.NUI/src/public/NUIApplication.cs | 13 +++++++++++++ 2 files changed, 19 insertions(+) diff --git a/src/Tizen.NUI/src/internal/Application.cs b/src/Tizen.NUI/src/internal/Application.cs index 8ad6f0d..2b8bc2a 100755 --- a/src/Tizen.NUI/src/internal/Application.cs +++ b/src/Tizen.NUI/src/internal/Application.cs @@ -618,6 +618,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(); diff --git a/src/Tizen.NUI/src/public/NUIApplication.cs b/src/Tizen.NUI/src/public/NUIApplication.cs index 712336d..2326ced 100755 --- a/src/Tizen.NUI/src/public/NUIApplication.cs +++ b/src/Tizen.NUI/src/public/NUIApplication.cs @@ -42,6 +42,7 @@ namespace Tizen.NUI private Position2D _windowPosition2D = null; private TransitionOptions transitionOptions; + private static bool isPreLoad = false; /// /// The default constructor. @@ -386,6 +387,7 @@ namespace Tizen.NUI { Interop.Application.PreInitialize(); ThemeManager.EnsureDefaultTheme(); + isPreLoad = true; } /// @@ -412,6 +414,17 @@ namespace Tizen.NUI transitionOptions = value; } } + + /// + /// Check if it is loaded as dotnet-loader-nui. + /// + static internal bool IsPreLoad + { + get + { + return isPreLoad; + } + } } /// -- 2.7.4