From f630a2249ff1cc1b39faf6dba7355ba2ac8a9898 Mon Sep 17 00:00:00 2001 From: Seoyeon Kim Date: Wed, 18 Mar 2020 14:53:32 +0900 Subject: [PATCH 1/1] Add cancel event flag in Key up event - When the key need to be combined with the previous key, the event should not perform anything. - So, added cancel processing flag in OnKeyUp() Change-Id: I02ea223282241555931952daf48c95918ba12129 Signed-off-by: Seoyeon Kim --- .../tizen-wayland/ecore-wl/window-base-ecore-wl.cpp | 9 +++++++++ .../tizen-wayland/ecore-wl2/window-base-ecore-wl2.cpp | 9 +++++++++ 2 files changed, 18 insertions(+) diff --git a/dali/internal/window-system/tizen-wayland/ecore-wl/window-base-ecore-wl.cpp b/dali/internal/window-system/tizen-wayland/ecore-wl/window-base-ecore-wl.cpp index 509ddd4..2211081 100644 --- a/dali/internal/window-system/tizen-wayland/ecore-wl/window-base-ecore-wl.cpp +++ b/dali/internal/window-system/tizen-wayland/ecore-wl/window-base-ecore-wl.cpp @@ -1026,6 +1026,15 @@ void WindowBaseEcoreWl::OnKeyUp( void* data, int type, void* event ) { DALI_LOG_INFO( gWindowBaseLogFilter, Debug::General, "WindowBaseEcoreWl::OnKeyUp\n" ); +#if defined(ECORE_VERSION_MAJOR) && (ECORE_VERSION_MAJOR >= 1) && defined(ECORE_VERSION_MINOR) && (ECORE_VERSION_MINOR >= 23) + // Cancel processing flag is sent because this key event will combine with the previous key. So, the event should not actually perform anything. + if( keyEvent->event_flags & ECORE_EVENT_FLAG_CANCEL ) + { + DALI_LOG_INFO( gWindowBaseLogFilter, Debug::General, "WindowBaseEcoreWl::OnKeyUp: This event flag indicates the event is canceled. \n" ); + return; + } +#endif // Since ecore 1.23 version + std::string keyName( keyEvent->keyname ); std::string logicalKey( "" ); std::string keyString( "" ); 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 89fae58..21a8b64 100755 --- 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 @@ -1173,6 +1173,15 @@ void WindowBaseEcoreWl2::OnKeyUp( void* data, int type, void* event ) { DALI_LOG_INFO( gWindowBaseLogFilter, Debug::General, "WindowBaseEcoreWl::OnKeyUp\n" ); +#if defined(ECORE_VERSION_MAJOR) && (ECORE_VERSION_MAJOR >= 1) && defined(ECORE_VERSION_MINOR) && (ECORE_VERSION_MINOR >= 23) + // Cancel processing flag is sent because this key event will combine with the previous key. So, the event should not actually perform anything. + if( keyEvent->event_flags & ECORE_EVENT_FLAG_CANCEL ) + { + DALI_LOG_INFO( gWindowBaseLogFilter, Debug::General, "WindowBaseEcoreWl2::OnKeyUp: This event flag indicates the event is canceled. \n" ); + return; + } +#endif // Since ecore 1.23 version + std::string keyName( keyEvent->keyname ); std::string logicalKey( "" ); std::string keyString( "" ); -- 2.7.4