[Tizen] Set device class when mouse cancel 55/308755/2
authorEunki Hong <eunkiki.hong@samsung.com>
Fri, 29 Mar 2024 13:30:40 +0000 (22:30 +0900)
committerEunki Hong <eunkiki.hong@samsung.com>
Fri, 29 Mar 2024 13:52:01 +0000 (22:52 +0900)
Let we add device and screen and etc informations at MouseCancel event.

It will be used when interrupt event sended to application side.

Change-Id: I29f88d49234b33840783f8297c8e605819f3085d
Signed-off-by: Eunki Hong <eunkiki.hong@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 ecd3ec6..5150e92 100644 (file)
@@ -898,10 +898,21 @@ void WindowBaseEcoreWl::OnMouseButtonCancel(void* data, int type, void* event)
 
   if(touchEvent->window == static_cast<unsigned int>(ecore_wl_window_id_get(mEcoreWindow)))
   {
+    Device::Class::Type    deviceClass;
+    Device::Subclass::Type deviceSubclass;
+
+    GetDeviceClass(ecore_device_class_get(touchEvent->dev), deviceClass);
+    GetDeviceSubclass(ecore_device_subclass_get(touchEvent->dev), deviceSubclass);
+
     Integration::Point point;
     point.SetDeviceId(touchEvent->multi.device);
     point.SetState(PointState::INTERRUPTED);
-    point.SetScreenPosition(Vector2(0.0f, 0.0f));
+    point.SetScreenPosition(Vector2(touchEvent->x, touchEvent->y));
+    point.SetRadius(touchEvent->multi.radius, Vector2(touchEvent->multi.radius_x, touchEvent->multi.radius_y));
+    point.SetPressure(touchEvent->multi.pressure);
+    point.SetAngle(Degree(touchEvent->multi.angle));
+    point.SetDeviceClass(deviceClass);
+    point.SetDeviceSubclass(deviceSubclass);
 
     mTouchEventSignal.Emit(point, touchEvent->timestamp);
 
index 9f02a2a..ea136a3 100644 (file)
@@ -1396,10 +1396,21 @@ void WindowBaseEcoreWl2::OnMouseButtonCancel(void* data, int type, void* event)
   {
     DALI_TRACE_SCOPE(gTraceFilter, "DALI_ON_MOUSE_CANCEL");
 
+    Device::Class::Type    deviceClass;
+    Device::Subclass::Type deviceSubclass;
+
+    GetDeviceClass(ecore_device_class_get(touchEvent->dev), deviceClass);
+    GetDeviceSubclass(ecore_device_subclass_get(touchEvent->dev), deviceSubclass);
+
     Integration::Point point;
     point.SetDeviceId(touchEvent->multi.device);
     point.SetState(PointState::INTERRUPTED);
-    point.SetScreenPosition(Vector2(0.0f, 0.0f));
+    point.SetScreenPosition(Vector2(touchEvent->x, touchEvent->y));
+    point.SetRadius(touchEvent->multi.radius, Vector2(touchEvent->multi.radius_x, touchEvent->multi.radius_y));
+    point.SetPressure(touchEvent->multi.pressure);
+    point.SetAngle(Degree(touchEvent->multi.angle));
+    point.SetDeviceClass(deviceClass);
+    point.SetDeviceSubclass(deviceSubclass);
 
     mTouchEventSignal.Emit(point, touchEvent->timestamp);