From: Seoyeon Kim Date: Mon, 3 Aug 2020 00:32:28 +0000 (+0900) Subject: Add cancel event flag in Key up event X-Git-Tag: dali_1.9.24~5^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=dad0f19579f14d26a6dff9025066f83264ea5ee0;hp=46cb142b197a8fa324796f12b4f49a7dbea2172c;p=platform%2Fcore%2Fuifw%2Fdali-adaptor.git Add cancel event flag in Key up event This reverts commit 71264bd78cbf8d6c31ff72bdc235a4b76c6599e5. - The ecore patch related to cancel event flag is applied to the latest platform. So, this patch can be applied now. Change-Id: I0c4617b6517cad1036426732394f8cd2139a8e2a --- 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 ac6879d..e4b610d 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 db4fa50..1032878 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 @@ -1178,6 +1178,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( "" );