[NUI] temporary fix! fix wrong value of screen position in object dump
[platform/core/csapi/tizenfx.git] / src / Tizen.NUI / src / public / NUIApplication.cs
index a79785e..3b70b65 100755 (executable)
@@ -172,6 +172,13 @@ namespace Tizen.NUI
             DisposeQueue disposeQ = DisposeQueue.Instance;
             disposeQ.Initialize();
             base.OnCreate();
+
+            // Dali's default layer is default center origin. need to change as top left.
+            // NUI's Layer is like a transparent film which covers entire window. (Layer is not an actor of Dali)
+            // otherwise, this makes ScreenPosition as wrong value.
+            Layer defaultLayer = Window.GetDefaultLayer();
+            defaultLayer.SetParentOrigin(Tizen.NUI.ParentOrigin.TopLeft);
+            defaultLayer.SetAnchorPoint(Tizen.NUI.PivotPoint.TopLeft);
         }
 
         /// <summary>