[Tizen] Temporarily modified so that window is no null
authorSunghyun kim <scholb.kim@samsung.com>
Wed, 22 Jan 2020 02:38:25 +0000 (11:38 +0900)
committerSunghyun Kim <scholb.kim@samsung.com>
Wed, 5 Feb 2020 08:08:38 +0000 (17:08 +0900)
Change-Id: I0003f10466fe58e3b1fd059a24491f6ce4958e5d

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

index ff22534..2b4b480 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 08562d0..9da92dd 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()