}
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
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()