Revert "[Tizen] Temporarily modified so that window is no null if multi-window is...
authorSeoyeon Kim <seoyeon2.kim@samsung.com>
Mon, 13 Apr 2020 07:41:05 +0000 (16:41 +0900)
committerSeoyeon Kim <seoyeon2.kim@samsung.com>
Mon, 13 Apr 2020 07:41:05 +0000 (16:41 +0900)
This reverts commit 8665f0e7867639372fd3e772d35d2cf68a16aefc.

dali/public-api/adaptor-framework/window.cpp

index 4741340..9d8c830 100644 (file)
@@ -48,21 +48,24 @@ Window Window::New(PositionSize posSize, const std::string& name, const std::str
     Dali::Adaptor& adaptor = Internal::Adaptor::Adaptor::Get();
     isNewWindowAllowed = Internal::Adaptor::Adaptor::GetImplementation(adaptor).IsMultipleWindowSupported();
   }
-  if (!isNewWindowAllowed)
-  {
-    DALI_LOG_ERROR("This device can't support multiple windows.\n");
-  }
 
-  Internal::Adaptor::Window* window = Internal::Adaptor::Window::New(posSize, name, className, isTransparent);
+  if (isNewWindowAllowed)
+  {
+    Internal::Adaptor::Window* window = Internal::Adaptor::Window::New(posSize, name, className, isTransparent);
 
-  Integration::SceneHolder sceneHolder = Integration::SceneHolder(window);
+    Integration::SceneHolder sceneHolder = Integration::SceneHolder(window);
 
-  if (isAdaptorAvailable)
+    if (isAdaptorAvailable)
+    {
+      Dali::Adaptor& adaptor = Internal::Adaptor::Adaptor::Get();
+      Internal::Adaptor::Adaptor::GetImplementation(adaptor).AddWindow(sceneHolder, name, className, isTransparent);
+    }
+    newWindow = Window(window);
+  }
+  else
   {
-    Dali::Adaptor& adaptor = Internal::Adaptor::Adaptor::Get();
-    Internal::Adaptor::Adaptor::GetImplementation(adaptor).AddWindow(sceneHolder, name, className, isTransparent);
+    DALI_LOG_ERROR("This device can't support multiple windows.\n");
   }
-  newWindow = Window(window);
 
   return newWindow;
 }