From 942645285ea60a7c8928f5f0a092f6694024d4c2 Mon Sep 17 00:00:00 2001 From: Wonsik Jung Date: Tue, 2 Jun 2020 16:28:49 +0900 Subject: [PATCH] Revert "[Tizen] Temporarily modified so that window is no null" This reverts commit 30b5f82ab94099a26d53f10a268e2debcede8443. Change-Id: Icdaeee2f4bb6c0b3f5bcd0383202f2ead11b94d2 --- .../tizen-wayland/widget-application-impl-tizen.cpp | 4 ++-- dali/public-api/adaptor-framework/window.cpp | 21 ++++++++++++--------- 2 files changed, 14 insertions(+), 11 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 2b4b480..ff22534 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 { - 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 diff --git a/dali/public-api/adaptor-framework/window.cpp b/dali/public-api/adaptor-framework/window.cpp index d82b0c6..9d8c830 100644 --- a/dali/public-api/adaptor-framework/window.cpp +++ b/dali/public-api/adaptor-framework/window.cpp @@ -49,20 +49,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; } -- 2.7.4