From 3fcbee3be7ba279e3f44f6e057307c1baee23a49 Mon Sep 17 00:00:00 2001 From: Seoyeon Kim Date: Mon, 27 Nov 2017 19:59:54 +0900 Subject: [PATCH] [4.0] Fix to get ecore_device information to initialize it - To pass the key event to ecore_imf_context_filter_event(), the device information, such as device name, device class, and device subclass, should be initialized by ecore_device APIs. - So, added ecore_device_name_get(), ecore_device_class_get(), ecore_device_subclass_get() in EcoreEventKeyDown() and EcoreEventKeyUp() Change-Id: Id553e2bc6f9ead07cd89aa82fce9d12efbe5281c Signed-off-by: Seoyeon Kim --- adaptors/ecore/wayland/event-handler-ecore-wl.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/adaptors/ecore/wayland/event-handler-ecore-wl.cpp b/adaptors/ecore/wayland/event-handler-ecore-wl.cpp index 4647b5c..964524e 100644 --- a/adaptors/ecore/wayland/event-handler-ecore-wl.cpp +++ b/adaptors/ecore/wayland/event-handler-ecore-wl.cpp @@ -665,9 +665,9 @@ struct EventHandler::Impl ecoreKeyDownEvent.timestamp = keyEvent->timestamp; ecoreKeyDownEvent.modifiers = EcoreInputModifierToEcoreIMFModifier ( keyEvent->modifiers ); ecoreKeyDownEvent.locks = (Ecore_IMF_Keyboard_Locks) ECORE_IMF_KEYBOARD_LOCK_NONE; - ecoreKeyDownEvent.dev_name = ""; - ecoreKeyDownEvent.dev_class = ECORE_IMF_DEVICE_CLASS_KEYBOARD; - ecoreKeyDownEvent.dev_subclass = ECORE_IMF_DEVICE_SUBCLASS_NONE; + ecoreKeyDownEvent.dev_name = ecore_device_name_get( keyEvent->dev ); + ecoreKeyDownEvent.dev_class = static_cast( ecore_device_class_get( keyEvent->dev ) ); + ecoreKeyDownEvent.dev_subclass = static_cast( ecore_device_subclass_get( keyEvent->dev ) ); std::string checkDevice; GetDeviceName( keyEvent, checkDevice ); @@ -770,9 +770,9 @@ struct EventHandler::Impl ecoreKeyUpEvent.timestamp = keyEvent->timestamp; ecoreKeyUpEvent.modifiers = EcoreInputModifierToEcoreIMFModifier ( keyEvent->modifiers ); ecoreKeyUpEvent.locks = (Ecore_IMF_Keyboard_Locks) ECORE_IMF_KEYBOARD_LOCK_NONE; - ecoreKeyUpEvent.dev_name = ""; - ecoreKeyUpEvent.dev_class = ECORE_IMF_DEVICE_CLASS_KEYBOARD; - ecoreKeyUpEvent.dev_subclass = ECORE_IMF_DEVICE_SUBCLASS_NONE; + ecoreKeyUpEvent.dev_name = ecore_device_name_get( keyEvent->dev ); + ecoreKeyUpEvent.dev_class = static_cast( ecore_device_class_get( keyEvent->dev ) ); + ecoreKeyUpEvent.dev_subclass = static_cast( ecore_device_subclass_get( keyEvent->dev ) ); eventHandled = ecore_imf_context_filter_event( imfContext, ECORE_IMF_EVENT_KEY_UP, -- 2.7.4