[Tizen] Temporarily modified so that window is no null
authorSeungho, Baek <sbsh.baek@samsung.com>
Wed, 1 Apr 2020 06:07:37 +0000 (15:07 +0900)
committerSeungho, Baek <sbsh.baek@samsung.com>
Wed, 1 Apr 2020 06:07:42 +0000 (15:07 +0900)
This reverts commit 098cbbf9ec3e778c9db9dbd84f2c4261facb3501.

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

index ff22534379bcc674e96b9c1a2693b036bb2ada03..2b4b480d12e05d9e2238f12eb9717878a6f9c3e3 100644 (file)
@@ -55,9 +55,9 @@ int OnInstanceInit(widget_base_instance_h instanceHandle, bundle *content, int w
   }
   else
   {
-    window = Dali::Window::New(PositionSize(0,0,w,h) ,"", false);
-    if( window )
+    if(Internal::Adaptor::Adaptor::GetImplementation(application->GetAdaptor()).IsMultipleWindowSupported())
     {
+      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 08562d0463f4d153e5ce169979a3abe422f3fd04..9da92dd2cbabd4186047a33bba3c80545e7b9146 100644 (file)
@@ -34,39 +34,27 @@ class DALI_INTERNAL DragAndDropDetector : public BaseHandle {}; // Empty class o
 Window Window::New(PositionSize posSize, const std::string& name, bool isTransparent)
 {
   Internal::Adaptor::Window* window = Internal::Adaptor::Window::New(posSize, name, "", isTransparent);
-
   Dali::Adaptor& adaptor = Internal::Adaptor::Adaptor::Get();
-  if( Internal::Adaptor::Adaptor::GetImplementation( adaptor ).IsMultipleWindowSupported() )
-  {
-    Integration::SceneHolder sceneHolder = Integration::SceneHolder( window );
-    Internal::Adaptor::Adaptor::GetImplementation( adaptor ).AddWindow( sceneHolder, name, "", isTransparent );
-
-    return Window(window);
-  }
-  else
+  Integration::SceneHolder sceneHolder = Integration::SceneHolder( window );
+  Internal::Adaptor::Adaptor::GetImplementation( adaptor ).AddWindow( sceneHolder, name, "", isTransparent );
+  if( !Internal::Adaptor::Adaptor::GetImplementation( adaptor ).IsMultipleWindowSupported() )
   {
     DALI_LOG_ERROR("This device can't support multiple windows.\n");
-    return Window();
   }
+  return Window(window);
 }
 
 Window Window::New(PositionSize posSize, const std::string& name, const std::string& className, bool isTransparent)
 {
   Internal::Adaptor::Window* window = Internal::Adaptor::Window::New(posSize, name, className, isTransparent);
-
   Dali::Adaptor& adaptor = Internal::Adaptor::Adaptor::Get();
-  if( Internal::Adaptor::Adaptor::GetImplementation( adaptor ).IsMultipleWindowSupported() )
-  {
-    Integration::SceneHolder sceneHolder = Integration::SceneHolder( window );
-    Internal::Adaptor::Adaptor::GetImplementation( adaptor ).AddWindow( sceneHolder, name, className, isTransparent );
-
-    return Window(window);
-  }
-  else
+  Integration::SceneHolder sceneHolder = Integration::SceneHolder( window );
+  Internal::Adaptor::Adaptor::GetImplementation( adaptor ).AddWindow( sceneHolder, name, className, isTransparent );
+  if( !Internal::Adaptor::Adaptor::GetImplementation( adaptor ).IsMultipleWindowSupported() )
   {
     DALI_LOG_ERROR("This device can't support multiple windows.\n");
-    return Window();
   }
+  return Window(window);
 }
 
 Window::Window()