[Tizen] Fixed FeedTouchEvent
authorJaehyun Cho <jae_hyun.cho@samsung.com>
Tue, 27 Aug 2024 06:43:09 +0000 (15:43 +0900)
committerJaehyun Cho <jae_hyun.cho@samsung.com>
Tue, 27 Aug 2024 06:43:09 +0000 (15:43 +0900)
This reverts commit 2cc64f018f0733ef65bacc0e0e0c7b665c5743ea.

dali-extension/web-engine-chromium/tizen-web-engine-chromium.cpp

index 78c3a4c..2c0bbb6 100644 (file)
@@ -609,50 +609,55 @@ bool TizenWebEngineChromium::FeedTouchEvent(const TouchEvent& touch)
   Ewk_Touch_Event_Type   type  = EWK_TOUCH_START;
   Evas_Touch_Point_State state = EVAS_TOUCH_POINT_DOWN;
 
-  std::size_t pointCount = touch.GetPointCount() - 1;
-
-  switch(touch.GetState(pointCount))
+  bool fed = false;
+  for(std::size_t i = 0; i < touch.GetPointCount(); i++)
   {
-    case PointState::DOWN:
-    {
-      type  = EWK_TOUCH_START;
-      state = EVAS_TOUCH_POINT_DOWN;
-      break;
-    }
-    case PointState::UP:
-    {
-      type  = EWK_TOUCH_END;
-      state = EVAS_TOUCH_POINT_UP;
-      break;
-    }
-    case PointState::MOTION:
+    switch(touch.GetState(i))
     {
-      type  = EWK_TOUCH_MOVE;
-      state = EVAS_TOUCH_POINT_MOVE;
-      break;
-    }
-    case PointState::INTERRUPTED:
-    {
-      type  = EWK_TOUCH_CANCEL;
-      state = EVAS_TOUCH_POINT_CANCEL;
-      break;
+      case PointState::DOWN:
+      {
+        type  = EWK_TOUCH_START;
+        state = EVAS_TOUCH_POINT_DOWN;
+        break;
+      }
+      case PointState::UP:
+      {
+        type  = EWK_TOUCH_END;
+        state = EVAS_TOUCH_POINT_UP;
+        break;
+      }
+      case PointState::MOTION:
+      {
+        type  = EWK_TOUCH_MOVE;
+        state = EVAS_TOUCH_POINT_MOVE;
+        break;
+      }
+      case PointState::INTERRUPTED:
+      {
+        type  = EWK_TOUCH_CANCEL;
+        state = EVAS_TOUCH_POINT_CANCEL;
+        break;
+      }
+      default:
+      {
+        break;
+      }
     }
-    default:
+
+    Eina_List*      pointList = 0;
+    Ewk_Touch_Point point;
+    point.id    = i;
+    point.x     = touch.GetScreenPosition(i).x;
+    point.y     = touch.GetScreenPosition(i).y;
+    point.state = state;
+    pointList   = eina_list_append(pointList, &point);
+    fed = ewk_view_feed_touch_event(mWebView, type, pointList, 0);
+    eina_list_free(pointList);
+    if(!fed)
     {
       break;
     }
   }
-
-  Eina_List*      pointList = 0;
-  Ewk_Touch_Point point;
-  point.id    = pointCount;
-  point.x     = touch.GetScreenPosition(pointCount).x;
-  point.y     = touch.GetScreenPosition(pointCount).y;
-  point.state = state;
-  pointList   = eina_list_append(pointList, &point);
-
-  bool fed = ewk_view_feed_touch_event(mWebView, type, pointList, 0);
-  eina_list_free(pointList);
   return fed;
 }