[Tizen] Fixed FeedTouchEvent 44/315744/1
authordongsug.song <dongsug.song@samsung.com>
Wed, 31 Jul 2024 00:38:55 +0000 (09:38 +0900)
committerdongsug.song <dongsug.song@samsung.com>
Wed, 7 Aug 2024 04:49:00 +0000 (13:49 +0900)
This reverts commit 5bed74d5d1327358889d1519757efcaf10fb4e98.

Change-Id: I69f4c7365cf705f000cde32437fab74d7f8c59bb

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

index cababff..1d80d0d 100644 (file)
@@ -615,50 +615,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;
 }