Fix pre-initialized window issue
[platform/core/uifw/dali-adaptor.git] / dali / internal / window-system / common / window-impl.cpp
index d35cf40..fe37203 100644 (file)
@@ -143,8 +143,6 @@ void Window::Initialize(Any surface, const PositionSize& positionSize, const std
 
   SetClass(name, className);
 
-  mWindowSurface->Map();
-
   mOrientation = Orientation::New(this);
 
   // Get OrientationMode
@@ -172,7 +170,8 @@ void Window::OnAdaptorSet(Dali::Adaptor& adaptor)
   auto accessible = Accessibility::Accessible::Get(v, true);
   bridge->AddTopLevelWindow(accessible);
 
-  //FIXME: line below is temporary solution for missing "activate" signal and should be removed
+  // If you call the 'Show' before creating the adaptor, the application cannot know the app resource id.
+  // The show must be called after the adaptor is initialized.
   Show();
 }
 
@@ -673,6 +672,11 @@ void Window::SetPositionSize(PositionSize positionSize)
   mSurface->SetFullSwapNextFrame();
 }
 
+PositionSize Window::GetPositionSize() const
+{
+  return mSurface->GetPositionSize();
+}
+
 Dali::Layer Window::GetRootLayer() const
 {
   return mScene.GetRootLayer();