From: Heeyong Song Date: Wed, 12 Jan 2022 04:50:14 +0000 (+0900) Subject: Revert "[Tizen] Change to latest wayland inputmethod protocol" X-Git-Tag: accepted/tizen/unified/20220114.130159~3 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=5d0d61950549ba064a52256548e85fa8756f4961;p=platform%2Fcore%2Fuifw%2Fdali-adaptor.git Revert "[Tizen] Change to latest wayland inputmethod protocol" This reverts commit 3f4954bd94e07bf3cb019b1699e9e1684c7bdf7a. --- 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 f63e799..ccea97c 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 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022 Samsung Electronics Co., Ltd. + * Copyright (c) 2021 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -582,9 +582,9 @@ static Eina_Bool EcoreEventWindowRedrawRequest(void* data, int type, void* event ///////////////////////////////////////////////////////////////////////////////////////////////// // Window Auxiliary Message Callbacks ///////////////////////////////////////////////////////////////////////////////////////////////// -static Eina_Bool EcoreEventWindowAuxiliaryMessage(void* data, int type, void* event) +static Eina_Bool EcoreEventWindowAuxiliaryMessage(void *data, int type, void *event) { - WindowBaseEcoreWl2* windowBase = static_cast(data); + WindowBaseEcoreWl2* windowBase = static_cast(data); if(windowBase) { windowBase->OnEcoreEventWindowAuxiliaryMessage(event); @@ -1403,30 +1403,31 @@ void WindowBaseEcoreWl2::OnEcoreEventWindowRedrawRequest() void WindowBaseEcoreWl2::OnEcoreEventWindowAuxiliaryMessage(void* event) { - Ecore_Wl2_Event_Aux_Message* message = static_cast(event); - if(message) - { - DALI_LOG_RELEASE_INFO("WindowBaseEcoreWl2::OnEcoreEventWindowAuxiliaryMessage, key:%s, value:%s \n", message->key, message->val); - std::string key(message->key); - std::string value(message->val); - Dali::Property::Array options; + Ecore_Wl2_Event_Aux_Message *message = static_cast(event); + if(message) + { + DALI_LOG_RELEASE_INFO("WindowBaseEcoreWl2::OnEcoreEventWindowAuxiliaryMessage, key:%s, value:%s \n",message->key, message->val); + std::string key(message->key); + std::string value(message->val); + Dali::Property::Array options; - if(message->options) - { - Eina_List* l; - void* data; - EINA_LIST_FOREACH(message->options, l, data) - { - DALI_LOG_RELEASE_INFO("WindowBaseEcoreWl2::OnEcoreEventWindowAuxiliaryMessage, option: %s\n", (char*)data); - std::string option(static_cast(data)); - options.Add(option); - } - } + if(message->options) + { + Eina_List *l; + void* data; + EINA_LIST_FOREACH(message->options, l, data) + { + DALI_LOG_RELEASE_INFO("WindowBaseEcoreWl2::OnEcoreEventWindowAuxiliaryMessage, option: %s\n",(char*)data); + std::string option(static_cast(data)); + options.Add(option); + } + } - mAuxiliaryMessageSignal.Emit(key, value, options); - } + mAuxiliaryMessageSignal.Emit(key, value, options); + } } + void WindowBaseEcoreWl2::KeymapChanged(void* data, int type, void* event) { Ecore_Wl2_Event_Seat_Keymap_Changed* changed = static_cast(event); @@ -2613,9 +2614,9 @@ void WindowBaseEcoreWl2::InitializeIme() EINA_ITERATOR_FOREACH(globals, global) { - if(strcmp(global->interface, "zwp_input_panel_v1") == 0) + if(strcmp(global->interface, "wl_input_panel") == 0) { - mWlInputPanel = (zwp_input_panel_v1*)wl_registry_bind(registry, global->id, &zwp_input_panel_v1_interface, 1); + mWlInputPanel = (wl_input_panel*)wl_registry_bind(registry, global->id, &wl_input_panel_interface, 1); } else if(strcmp(global->interface, "wl_output") == 0) { @@ -2635,14 +2636,14 @@ void WindowBaseEcoreWl2::InitializeIme() return; } - mWlInputPanelSurface = zwp_input_panel_v1_get_input_panel_surface(mWlInputPanel, mWlSurface); + mWlInputPanelSurface = wl_input_panel_get_input_panel_surface(mWlInputPanel, mWlSurface); if(!mWlInputPanelSurface) { DALI_LOG_ERROR("WindowBaseEcoreWl2::InitializeIme(), fail to get wayland input panel surface\n"); return; } - zwp_input_panel_surface_v1_set_toplevel(mWlInputPanelSurface, mWlOutput, ZWP_INPUT_PANEL_SURFACE_V1_POSITION_CENTER_BOTTOM); + wl_input_panel_surface_set_toplevel(mWlInputPanelSurface, mWlOutput, WL_INPUT_PANEL_SURFACE_POSITION_CENTER_BOTTOM); } void WindowBaseEcoreWl2::ImeWindowReadyToRender() @@ -2653,7 +2654,7 @@ void WindowBaseEcoreWl2::ImeWindowReadyToRender() return; } - zwp_input_panel_surface_v1_set_ready(mWlInputPanelSurface, 1); + wl_input_panel_surface_set_ready(mWlInputPanelSurface, 1); } void WindowBaseEcoreWl2::RequestMoveToServer() 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 3a42ac5..3df827b 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 @@ -2,7 +2,7 @@ #define DALI_INTERNAL_WINDOWSYSTEM_TIZENWAYLAND_WINDOW_BASE_ECORE_WL2_H /* - * Copyright (c) 2022 Samsung Electronics Co., Ltd. + * Copyright (c) 2021 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -176,6 +176,7 @@ public: */ void OnEcoreEventWindowAuxiliaryMessage(void* event); + #ifdef DALI_ELDBUS_AVAILABLE /** * @brief Called when Ecore ElDBus accessibility event is received. @@ -547,10 +548,10 @@ private: Dali::Vector mEcoreEventHandler; Ecore_Wl2_Window* mEcoreWindow; - wl_surface* mWlSurface; - zwp_input_panel_v1* mWlInputPanel; - wl_output* mWlOutput; - zwp_input_panel_surface_v1* mWlInputPanelSurface; + wl_surface* mWlSurface; + wl_input_panel* mWlInputPanel; + wl_output* mWlOutput; + wl_input_panel_surface* mWlInputPanelSurface; wl_egl_window* mEglWindow; wl_display* mDisplay;