Revert "[Tizen] Temporarily modified so that window is no null"
authorWonsik Jung <sidein@samsung.com>
Mon, 10 Aug 2020 05:38:29 +0000 (14:38 +0900)
committerWonsik Jung <sidein@samsung.com>
Mon, 10 Aug 2020 05:38:34 +0000 (14:38 +0900)
This reverts commit 4cfe2bcb880a9b21bfba69156bafa341ebbd0389.

dali/internal/system/tizen-wayland/widget-application-impl-tizen.cpp
dali/public-api/adaptor-framework/window.cpp

index 2b4b480..ff22534 100644 (file)
@@ -55,9 +55,9 @@ int OnInstanceInit(widget_base_instance_h instanceHandle, bundle *content, int w
   }
   else
   {
-    if(Internal::Adaptor::Adaptor::GetImplementation(application->GetAdaptor()).IsMultipleWindowSupported())
+    window = Dali::Window::New(PositionSize(0,0,w,h) ,"", false);
+    if( window )
     {
-      window = Dali::Window::New(PositionSize(0,0,w,h) ,"", false);
       DALI_LOG_RELEASE_INFO("Widget Instance create new Window  (win:%p, cnt:%d) (%dx%d) (id:%s )\n", window, application->GetWidgetCount(), w, h, std::string(id).c_str());
     }
     else
index 3c5d6fa..c073254 100644 (file)
@@ -47,20 +47,23 @@ Window Window::New(PositionSize posSize, const std::string& name, const std::str
     isNewWindowAllowed = Internal::Adaptor::Adaptor::GetImplementation(adaptor).IsMultipleWindowSupported();
   }
 
-  if (!isNewWindowAllowed)
+  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);
+    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;
 }