[TSAM-5237] Fixed textEditor backspace & lock/unlock issue 33/79233/2
authorsuhyung Eom <suhyung.eom@samsung.com>
Sat, 9 Jul 2016 09:18:03 +0000 (18:18 +0900)
committersuhyung Eom <suhyung.eom@samsung.com>
Sat, 9 Jul 2016 09:20:15 +0000 (18:20 +0900)
Signed-off-by: suhyung Eom <suhyung.eom@samsung.com>
Change-Id: Ia3295da34878df6283ce182bce963d6903e4255e

adaptors/ecore/wayland/event-handler-ecore-wl.cpp

index 419e880..ce0fafc 100644 (file)
@@ -49,6 +49,7 @@
 #include <physical-keyboard-impl.h>
 #include <style-monitor-impl.h>
 #include <base/core-event-interface.h>
+#include <virtual-keyboard.h>
 
 namespace Dali
 {
@@ -376,10 +377,10 @@ struct EventHandler::Impl
       {
         std::string keyName( keyEvent->keyname );
         std::string keyString( "" );
-        int keyCode = 0/*ecore_x_keysym_keycode_get(keyEvent->keyname)*/;
+        int keyCode = KeyLookup::GetDaliKeyCode( keyEvent->keyname);
+        keyCode = (keyCode == -1) ? 0 : keyCode;
         int modifier( keyEvent->modifiers );
         unsigned long time = keyEvent->timestamp;
-
         if (!strncmp(keyEvent->keyname, "Keycode-", 8))
           keyCode = atoi(keyEvent->keyname + 8);
 
@@ -665,10 +666,24 @@ struct EventHandler::Impl
     handler->SendEvent( StyleChange::DEFAULT_FONT_SIZE_CHANGE );
   }
 
+  void KeyboardVisibilityOnPause()
+  {
+    mKeyboardVisibilityOnPause = VirtualKeyboard::IsVisible() ? 1 : 0;
+  }
+
+  void KeyboardVisibilityOnResume()
+  {
+    if (mKeyboardVisibilityOnPause)
+    {
+      VirtualKeyboard::Show();
+    }
+  }
+
   // Data
   EventHandler* mHandler;
   std::vector<Ecore_Event_Handler*> mEcoreEventHandler;
   Ecore_Wl_Window* mWindow;
+  bool mKeyboardVisibilityOnPause;
 };
 
 EventHandler::EventHandler( RenderSurface* surface, CoreEventInterface& coreEventInterface, GestureManager& gestureManager, DamageObserver& damageObserver, DragAndDropDetectorPtr dndDetector )
@@ -833,12 +848,14 @@ void EventHandler::Pause()
 {
   mPaused = true;
   Reset();
+  mImpl->KeyboardVisibilityOnPause();
 }
 
 void EventHandler::Resume()
 {
   mPaused = false;
   Reset();
+  mImpl->KeyboardVisibilityOnResume();
 }
 
 void EventHandler::SetDragAndDropDetector( DragAndDropDetectorPtr detector )