From ff7cceefafef35d36a7a72e52c49113ef3e171b8 Mon Sep 17 00:00:00 2001 From: neostom432 Date: Tue, 16 Jun 2020 02:42:18 +0900 Subject: [PATCH] [Tizen] Temporarily modified so that window is no null This reverts commit 563d07e73afa09514a0b16f76f96f91c19d64dc6. Change-Id: I6d3a439646617a917c3c083958d2010bfbc8ed1b --- .../tizen-wayland/widget-application-impl-tizen.cpp | 4 ++-- dali/public-api/adaptor-framework/window.cpp | 21 +++++++++------------ 2 files changed, 11 insertions(+), 14 deletions(-) diff --git a/dali/internal/system/tizen-wayland/widget-application-impl-tizen.cpp b/dali/internal/system/tizen-wayland/widget-application-impl-tizen.cpp index ff22534..2b4b480 100644 --- a/dali/internal/system/tizen-wayland/widget-application-impl-tizen.cpp +++ b/dali/internal/system/tizen-wayland/widget-application-impl-tizen.cpp @@ -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 diff --git a/dali/public-api/adaptor-framework/window.cpp b/dali/public-api/adaptor-framework/window.cpp index 9d8c830..d82b0c6 100644 --- a/dali/public-api/adaptor-framework/window.cpp +++ b/dali/public-api/adaptor-framework/window.cpp @@ -49,23 +49,20 @@ Window Window::New(PositionSize posSize, const std::string& name, const std::str isNewWindowAllowed = Internal::Adaptor::Adaptor::GetImplementation(adaptor).IsMultipleWindowSupported(); } - if (isNewWindowAllowed) + if (!isNewWindowAllowed) { - Internal::Adaptor::Window* window = Internal::Adaptor::Window::New(posSize, name, className, isTransparent); + DALI_LOG_ERROR("This device can't support multiple windows.\n"); + } + 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) - { - Dali::Adaptor& adaptor = Internal::Adaptor::Adaptor::Get(); - Internal::Adaptor::Adaptor::GetImplementation(adaptor).AddWindow(sceneHolder, name, className, isTransparent); - } - newWindow = Window(window); - } - else + if (isAdaptorAvailable) { - DALI_LOG_ERROR("This device can't support multiple windows.\n"); + Dali::Adaptor& adaptor = Internal::Adaptor::Adaptor::Get(); + Internal::Adaptor::Adaptor::GetImplementation(adaptor).AddWindow(sceneHolder, name, className, isTransparent); } + newWindow = Window(window); return newWindow; } -- 2.7.4