[NUI] Modify GetWindowList for getting Native Ptr (#1037)
authortscholb <scholb.kim@samsung.com>
Wed, 25 Sep 2019 07:06:10 +0000 (16:06 +0900)
committerdongsug-song <35130733+dongsug-song@users.noreply.github.com>
Wed, 25 Sep 2019 07:06:10 +0000 (16:06 +0900)
- Modify GetWindowList for getting Native Ptr
- Set Window name when creating window using window name

src/Tizen.NUI/src/internal/Application.cs
src/Tizen.NUI/src/public/Window.cs

index 228492c..215171f 100755 (executable)
@@ -1381,9 +1381,12 @@ namespace Tizen.NUI
             List<Window> WindowList = new List<Window>();
             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;
         }
index 10710b5..bf6af72 100755 (executable)
@@ -90,6 +90,7 @@ namespace Tizen.NUI
         /// <since_tizen> 6 </since_tizen>
         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();
         }