Add cancel event flag in Key up event 22/228222/1
authorSeoyeon Kim <seoyeon2.kim@samsung.com>
Wed, 18 Mar 2020 05:53:32 +0000 (14:53 +0900)
committerSeoyeon Kim <seoyeon2.kim@samsung.com>
Fri, 20 Mar 2020 01:24:38 +0000 (10:24 +0900)
- 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 <seoyeon2.kim@samsung.com>
dali/internal/window-system/tizen-wayland/ecore-wl/window-base-ecore-wl.cpp
dali/internal/window-system/tizen-wayland/ecore-wl2/window-base-ecore-wl2.cpp

index 509ddd4d9efb3c7aba0dc7f845369276db055b52..2211081819b0b5483329115f65c5abaa9e4cd87a 100644 (file)
@@ -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( "" );
index 89fae585f302ac23bf40f4d7274ece86d3470b36..21a8b6411263b2cc634da5a5133131895c7202cb 100755 (executable)
@@ -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( "" );