Revert "[Tizen] Revert "Support multiple window rendering""
[platform/core/uifw/dali-adaptor.git] / dali / internal / input / tizen-wayland / input-method-context-impl-ecore-wl.cpp
index b043d32..34255a5 100755 (executable)
@@ -329,7 +329,7 @@ void InputMethodContextEcoreWl::CreateContext()
       // If we fail to get window id, we can't use the InputMethodContext correctly.
       // Thus you have to call "ecore_imf_context_client_window_set" somewhere.
       // In EvasPlugIn, this function is called in EvasPlugin::ConnectEcoreEvent().
-      RenderSurface& renderSurface = Dali::Adaptor::Get().GetSurface();
+      Dali::RenderSurfaceInterface& renderSurface = Dali::Adaptor::Get().GetSurface();
       WindowRenderSurface& windowRenderSurface = static_cast< WindowRenderSurface& >( renderSurface );
 
       int windowId = windowRenderSurface.GetNativeWindowId();
@@ -946,13 +946,16 @@ bool InputMethodContextEcoreWl::ProcessEventKeyDown( const KeyEvent& keyEvent )
   bool eventHandled( false );
   if ( mIMFContext )
   {
+    Integration::KeyEvent integKeyEvent( keyEvent );
+    std::string key = integKeyEvent.logicalKey;
+
     std::string compose = keyEvent.GetCompose();
     std::string deviceName = keyEvent.GetDeviceName();
 
     // We're consuming key down event so we have to pass to InputMethodContext so that it can parse it as well.
     Ecore_IMF_Event_Key_Down ecoreKeyDownEvent;
     ecoreKeyDownEvent.keyname = keyEvent.keyPressedName.c_str();
-    ecoreKeyDownEvent.key = keyEvent.keyPressedName.c_str();
+    ecoreKeyDownEvent.key = key.c_str();
     ecoreKeyDownEvent.string = keyEvent.keyPressed.c_str();
     ecoreKeyDownEvent.compose = compose.c_str();
     ecoreKeyDownEvent.timestamp = keyEvent.time;
@@ -996,13 +999,16 @@ bool InputMethodContextEcoreWl::ProcessEventKeyUp( const KeyEvent& keyEvent )
   bool eventHandled( false );
   if( mIMFContext )
   {
+    Integration::KeyEvent integKeyEvent( keyEvent );
+    std::string key = integKeyEvent.logicalKey;
+
     std::string compose = keyEvent.GetCompose();
     std::string deviceName = keyEvent.GetDeviceName();
 
     // We're consuming key up event so we have to pass to InputMethodContext so that it can parse it as well.
     Ecore_IMF_Event_Key_Up ecoreKeyUpEvent;
     ecoreKeyUpEvent.keyname = keyEvent.keyPressedName.c_str();
-    ecoreKeyUpEvent.key = keyEvent.keyPressedName.c_str();
+    ecoreKeyUpEvent.key = key.c_str();
     ecoreKeyUpEvent.string = keyEvent.keyPressed.c_str();
     ecoreKeyUpEvent.compose = compose.c_str();
     ecoreKeyUpEvent.timestamp = keyEvent.time;