From 5cc361123465e81e17efe13bfd37d6472c61590b Mon Sep 17 00:00:00 2001 From: tscholb Date: Wed, 25 Sep 2019 16:06:10 +0900 Subject: [PATCH] [NUI] Modify GetWindowList for getting Native Ptr (#1037) - Modify GetWindowList for getting Native Ptr - Set Window name when creating window using window name --- src/Tizen.NUI/src/internal/Application.cs | 7 +++++-- src/Tizen.NUI/src/public/Window.cs | 1 + 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/Tizen.NUI/src/internal/Application.cs b/src/Tizen.NUI/src/internal/Application.cs index 228492c28..215171f8e 100755 --- a/src/Tizen.NUI/src/internal/Application.cs +++ b/src/Tizen.NUI/src/internal/Application.cs @@ -1381,9 +1381,12 @@ namespace Tizen.NUI List WindowList = new List(); for( uint i = 0; i < ListSize; ++i ) { - Window currWin = new Window(Interop.Application.Application_GetWindowsFromList(i), true); + Window currWin = Registry.GetManagedBaseHandleFromNativePtr(Interop.Application.Application_GetWindowsFromList(i)) as Window; if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - WindowList.Add(currWin); + if(currWin) + { + WindowList.Add(currWin); + } } return WindowList; } diff --git a/src/Tizen.NUI/src/public/Window.cs b/src/Tizen.NUI/src/public/Window.cs index 10710b52a..bf6af72d8 100755 --- a/src/Tizen.NUI/src/public/Window.cs +++ b/src/Tizen.NUI/src/public/Window.cs @@ -90,6 +90,7 @@ namespace Tizen.NUI /// 6 public Window(string name, Rectangle windowPosition = null, bool isTranslucent = false) : this(Interop.Window.Window_New__SWIG_0(Rectangle.getCPtr(windowPosition), name, isTranslucent), true) { + this._windowTitle = name; if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } -- 2.34.1