From: Wonsik Jung Date: Mon, 6 Nov 2023 12:43:02 +0000 (+0900) Subject: [Tizen] Fix IME Window is not shown issue. X-Git-Tag: accepted/tizen/unified/20231107.172904^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b61b28aef1e6fe81bfe2cc599ee043721505c17a;p=platform%2Fcore%2Fuifw%2Fdali-adaptor.git [Tizen] Fix IME Window is not shown issue. Fix IME Window is not shown issue when keyboard type is changed runtime. It is caused by IME window is not initialized when the window is supported by candidate process. Change-Id: Idf52c718ee473e3349517389cc794a22717e8a03 --- diff --git a/dali/internal/window-system/common/window-impl.cpp b/dali/internal/window-system/common/window-impl.cpp index d78acb8..e91a74a 100644 --- a/dali/internal/window-system/common/window-impl.cpp +++ b/dali/internal/window-system/common/window-impl.cpp @@ -226,6 +226,12 @@ void Window::OnAdaptorSet(Dali::Adaptor& adaptor) mEventHandler = EventHandlerPtr(new EventHandler(mWindowSurface->GetWindowBase(), *mAdaptor)); mEventHandler->AddObserver(*this); + if(mWindowBase->GetType() == WindowType::IME) + { + mWindowBase->InitializeIme(); + mWindowSurface->InitializeImeSurface(); + } + // Add Window to bridge for ATSPI auto bridge = Accessibility::Bridge::GetCurrentBridge(); diff --git a/dali/internal/window-system/common/window-render-surface.cpp b/dali/internal/window-system/common/window-render-surface.cpp index e6e4556..1955aa4 100644 --- a/dali/internal/window-system/common/window-render-surface.cpp +++ b/dali/internal/window-system/common/window-render-surface.cpp @@ -344,6 +344,11 @@ void WindowRenderSurface::CreateSurface() // Create the EGL window EGLNativeWindowType window = mWindowBase->CreateEglWindow(width, height); + if(mWindowBase->GetType() == WindowType::IME) + { + InitializeImeSurface(); + } + auto eglGraphics = static_cast(mGraphics); Internal::Adaptor::EglImplementation& eglImpl = eglGraphics->GetEglImplementation(); @@ -547,7 +552,7 @@ bool WindowRenderSurface::PreRender(bool resizingSurface, const std::vector(TriggerEventFactory::CreateTriggerEvent(MakeCallback(this, &WindowRenderSurface::ProcessPostRender), - TriggerEventInterface::KEEP_ALIVE_AFTER_TRIGGER)); + mIsImeWindowSurface = true; + if(!mPostRenderTrigger) + { + mPostRenderTrigger = std::unique_ptr(TriggerEventFactory::CreateTriggerEvent(MakeCallback(this, &WindowRenderSurface::ProcessPostRender), + TriggerEventInterface::KEEP_ALIVE_AFTER_TRIGGER)); + + } } } diff --git a/dali/internal/window-system/tizen-wayland/ecore-wl2/window-base-ecore-wl2.cpp b/dali/internal/window-system/tizen-wayland/ecore-wl2/window-base-ecore-wl2.cpp index 7731f85..ae2a5db 100644 --- a/dali/internal/window-system/tizen-wayland/ecore-wl2/window-base-ecore-wl2.cpp +++ b/dali/internal/window-system/tizen-wayland/ecore-wl2/window-base-ecore-wl2.cpp @@ -920,7 +920,8 @@ WindowBaseEcoreWl2::WindowBaseEcoreWl2(Dali::PositionSize positionSize, Any surf mScreenOffModeChangeDone(true), mVisible(true), mOwnSurface(false), - mBrightnessChangeDone(true) + mBrightnessChangeDone(true), + mIsIMEWindowInitialized(false) { Initialize(positionSize, surface, isTransparent); } @@ -2574,36 +2575,43 @@ void WindowBaseEcoreWl2::SetType(Dali::WindowType type) { case Dali::WindowType::NORMAL: { + DALI_LOG_RELEASE_INFO("WindowBaseEcoreWl2::SetType, Dali::WindowType::NORMAL\n"); windowType = ECORE_WL2_WINDOW_TYPE_TOPLEVEL; break; } case Dali::WindowType::NOTIFICATION: { + DALI_LOG_RELEASE_INFO("WindowBaseEcoreWl2::SetType, Dali::WindowType::NOTIFICATION\n"); windowType = ECORE_WL2_WINDOW_TYPE_NOTIFICATION; break; } case Dali::WindowType::UTILITY: { + DALI_LOG_RELEASE_INFO("WindowBaseEcoreWl2::SetType, Dali::WindowType::UTILITY\n"); windowType = ECORE_WL2_WINDOW_TYPE_UTILITY; break; } case Dali::WindowType::DIALOG: { + DALI_LOG_RELEASE_INFO("WindowBaseEcoreWl2::SetType, Dali::WindowType::DIALOG\n"); windowType = ECORE_WL2_WINDOW_TYPE_DIALOG; break; } case Dali::WindowType::IME: { + DALI_LOG_RELEASE_INFO("WindowBaseEcoreWl2::SetType, Dali::WindowType::IME\n"); windowType = ECORE_WL2_WINDOW_TYPE_NONE; break; } case Dali::WindowType::DESKTOP: { + DALI_LOG_RELEASE_INFO("WindowBaseEcoreWl2::SetType, Dali::WindowType::DESKTOP\n"); windowType = ECORE_WL2_WINDOW_TYPE_DESKTOP; break; } default: { + DALI_LOG_RELEASE_INFO("WindowBaseEcoreWl2::SetType, default window type\n"); windowType = ECORE_WL2_WINDOW_TYPE_TOPLEVEL; break; } @@ -2617,6 +2625,7 @@ void WindowBaseEcoreWl2::SetType(Dali::WindowType type) Dali::WindowType WindowBaseEcoreWl2::GetType() const { + DALI_LOG_RELEASE_INFO("GetType, DALI WindType: %d, mIsIMEWindowInitialized: %d\n", mType, mIsIMEWindowInitialized); return mType; } @@ -3248,13 +3257,19 @@ void WindowBaseEcoreWl2::InitializeIme() Ecore_Wl2_Global* global; Ecore_Wl2_Display* ecoreWl2Display; + if(mIsIMEWindowInitialized) + { + DALI_LOG_RELEASE_INFO("WindowBaseEcoreWl2::InitializeIme, IME Window is already initialized\n"); + return; + } + if(!(ecoreWl2Display = ecore_wl2_connected_display_get(NULL))) { DALI_LOG_ERROR("WindowBaseEcoreWl2::InitializeIme(), fail to get ecore_wl2 connected display\n"); return; } - DALI_LOG_RELEASE_INFO("InitializeIme: Ecore_Wl2_Display: %p, ecore wl window: %p\n", ecoreWl2Display, mEcoreWindow); + DALI_LOG_RELEASE_INFO("InitializeIme: Ecore_Wl2_Display: %p, ecore wl window: %p, mIsIMEWindowInitialized: %d\n", ecoreWl2Display, mEcoreWindow, mIsIMEWindowInitialized); if(!(registry = ecore_wl2_display_registry_get(ecoreWl2Display))) { @@ -3315,6 +3330,7 @@ void WindowBaseEcoreWl2::InitializeIme() wl_input_panel_surface_set_toplevel(mWlInputPanelSurface, mWlOutput, WL_INPUT_PANEL_SURFACE_POSITION_CENTER_BOTTOM); #endif FINISH_DURATION_CHECK("zwp_input_panel_surface_v1_set_toplevel"); + mIsIMEWindowInitialized = true; } void WindowBaseEcoreWl2::ImeWindowReadyToRender() diff --git a/dali/internal/window-system/tizen-wayland/ecore-wl2/window-base-ecore-wl2.h b/dali/internal/window-system/tizen-wayland/ecore-wl2/window-base-ecore-wl2.h index 6acb007..3ff8d07 100644 --- a/dali/internal/window-system/tizen-wayland/ecore-wl2/window-base-ecore-wl2.h +++ b/dali/internal/window-system/tizen-wayland/ecore-wl2/window-base-ecore-wl2.h @@ -728,6 +728,7 @@ private: bool mVisible : 1; bool mOwnSurface; bool mBrightnessChangeDone; + bool mIsIMEWindowInitialized; }; } // namespace Adaptor