For Frame Event 05/311805/18
authorjoogab.yun <joogab.yun@samsung.com>
Tue, 28 May 2024 07:12:46 +0000 (16:12 +0900)
committerjoogab.yun <joogab.yun@samsung.com>
Thu, 20 Jun 2024 00:07:47 +0000 (09:07 +0900)
When processing multiple multi-touches, they are grouped and processed.
Group multi-touch events and process them when a frame event occurs.

Change-Id: I1e3ac2a0026f3f95910b53521f3ddd8c6108de3c

17 files changed:
dali/integration-api/adaptor-framework/scene-holder-impl.cpp
dali/integration-api/adaptor-framework/scene-holder-impl.h
dali/internal/window-system/common/event-handler.cpp
dali/internal/window-system/common/event-handler.h
dali/internal/window-system/common/gl-window-impl.cpp
dali/internal/window-system/common/gl-window-impl.h
dali/internal/window-system/common/window-base.cpp
dali/internal/window-system/common/window-base.h
dali/internal/window-system/common/window-impl.cpp
dali/internal/window-system/common/window-impl.h
dali/internal/window-system/macos/window-base-mac.mm
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
dali/internal/window-system/tizen-wayland/ecore-wl2/window-base-ecore-wl2.h
dali/internal/window-system/ubuntu-x11/window-base-ecore-x.cpp
dali/internal/window-system/windows/window-base-win.cpp
dali/internal/window-system/x11/window-base-x.cpp

index 011b87f..d5e1cf1 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2023 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2024 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -49,6 +49,8 @@ namespace
 #if defined(DEBUG_ENABLED)
 Debug::Filter* gSceneHolderLogFilter = Debug::Filter::New(Debug::NoLogging, false, "LOG_SCENE_HOLDER");
 #endif
+
+const uint32_t MAX_PRESSED_POINT_COUNT = 2;
 } // unnamed namespace
 
 uint32_t SceneHolder::mSceneHolderCounter = 0;
@@ -93,7 +95,11 @@ SceneHolder::SceneHolder()
   mAdaptor(nullptr),
   mDpi(),
   mAdaptorStarted(false),
-  mVisible(true)
+  mVisible(true),
+  mHandledMultiTouch(false),
+  mPreviousTouchEvent(),
+  mPreviousHoverEvent(),
+  mPreviousType(Integration::TouchEventCombiner::DISPATCH_NONE)
 {
 }
 
@@ -316,13 +322,12 @@ void SceneHolder::FeedTouchPoint(Dali::Integration::Point& point, int timeStamp)
   {
     timeStamp = TimeService::GetMilliSeconds();
   }
-
   Vector2 convertedPosition = RecalculatePosition(point.GetScreenPosition());
   point.SetScreenPosition(convertedPosition);
 
   Integration::TouchEvent                            touchEvent;
   Integration::HoverEvent                            hoverEvent;
-  Integration::TouchEventCombiner::EventDispatchType type = mCombiner.GetNextTouchEvent(point, timeStamp, touchEvent, hoverEvent);
+  Integration::TouchEventCombiner::EventDispatchType type = mCombiner.GetNextTouchEvent(point, timeStamp, touchEvent, hoverEvent, mHandledMultiTouch);
   if(type != Integration::TouchEventCombiner::DISPATCH_NONE)
   {
     DALI_LOG_INFO(gSceneHolderLogFilter, Debug::Verbose, "%d: Device %d: Button state %d (%.2f, %.2f)\n", timeStamp, point.GetDeviceId(), point.GetState(), point.GetScreenPosition().x, point.GetScreenPosition().y);
@@ -331,22 +336,78 @@ void SceneHolder::FeedTouchPoint(Dali::Integration::Point& point, int timeStamp)
     // Keep the handle alive until the core events are processed.
     Dali::BaseHandle sceneHolder(this);
 
-    // First the touch and/or hover event & related gesture events are queued
+    uint32_t pointCount = touchEvent.GetPointCount();
+    if(pointCount > MAX_PRESSED_POINT_COUNT)
+    {
+      mPreviousTouchEvent = touchEvent;
+      mPreviousHoverEvent = hoverEvent;
+      if(mPreviousType == Integration::TouchEventCombiner::DISPATCH_NONE)
+      {
+        mPreviousType = type;
+      }
+      else if(mPreviousType != type)
+      {
+        mPreviousType = Integration::TouchEventCombiner::DISPATCH_BOTH;
+      }
+      mHandledMultiTouch = true;
+    }
+
     if(type == Integration::TouchEventCombiner::DISPATCH_TOUCH || type == Integration::TouchEventCombiner::DISPATCH_BOTH)
     {
       mLastTouchEvent = Dali::Integration::NewTouchEvent(timeStamp, point);
-      mScene.QueueEvent(touchEvent);
     }
 
     if(type == Integration::TouchEventCombiner::DISPATCH_HOVER || type == Integration::TouchEventCombiner::DISPATCH_BOTH)
     {
       mLastHoverEvent = Dali::Integration::NewHoverEvent(timeStamp, point);
-      mScene.QueueEvent(hoverEvent);
     }
 
     // Next the events are processed with a single call into Core
+    if(pointCount <= MAX_PRESSED_POINT_COUNT || (point.GetState() != PointState::MOTION))
+    {
+      mHandledMultiTouch = false;
+      mPreviousType      = Integration::TouchEventCombiner::DISPATCH_NONE;
+
+      // First the touch and/or hover event & related gesture events are queued
+      if(type == Integration::TouchEventCombiner::DISPATCH_TOUCH || type == Integration::TouchEventCombiner::DISPATCH_BOTH)
+      {
+        mScene.QueueEvent(touchEvent);
+      }
+
+      if(type == Integration::TouchEventCombiner::DISPATCH_HOVER || type == Integration::TouchEventCombiner::DISPATCH_BOTH)
+      {
+        mScene.QueueEvent(hoverEvent);
+      }
+      mAdaptor->ProcessCoreEvents();
+    }
+  }
+}
+
+void SceneHolder::FeedMouseFrameEvent()
+{
+  if(DALI_UNLIKELY(!mAdaptorStarted))
+  {
+    DALI_LOG_ERROR("Adaptor is stopped, or not be started yet. Ignore this feed.\n");
+    return;
+  }
+
+  if(mPreviousType == Integration::TouchEventCombiner::DISPATCH_TOUCH || mPreviousType == Integration::TouchEventCombiner::DISPATCH_BOTH)
+  {
+    mScene.QueueEvent(mPreviousTouchEvent);
+  }
+
+  if(mPreviousType == Integration::TouchEventCombiner::DISPATCH_HOVER || mPreviousType == Integration::TouchEventCombiner::DISPATCH_BOTH)
+  {
+    mScene.QueueEvent(mPreviousHoverEvent);
+  }
+
+  if(mPreviousType != Integration::TouchEventCombiner::DISPATCH_NONE)
+  {
     mAdaptor->ProcessCoreEvents();
   }
+
+  mHandledMultiTouch = false;
+  mPreviousType      = Integration::TouchEventCombiner::DISPATCH_NONE;
 }
 
 const Dali::TouchEvent& SceneHolder::GetLastTouchEvent() const
@@ -489,6 +550,8 @@ void SceneHolder::Reset()
   mScene.QueueEvent(event);
 
   // Next the events are processed with a single call into Core
+  mHandledMultiTouch = false;
+  mPreviousType      = Integration::TouchEventCombiner::DISPATCH_NONE;
   mAdaptor->ProcessCoreEvents();
 }
 
index 144bc13..0d984ec 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_INTEGRATION_INTERNAL_SCENEHOLDER_H
 
 /*
- * Copyright (c) 2023 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2024 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -24,6 +24,7 @@
 #include <dali/integration-api/events/key-event-integ.h>
 #include <dali/integration-api/events/point.h>
 #include <dali/integration-api/events/touch-event-combiner.h>
+#include <dali/integration-api/events/touch-event-integ.h>
 #include <dali/integration-api/scene.h>
 #include <dali/public-api/common/intrusive-ptr.h>
 #include <dali/public-api/events/hover-event.h>
@@ -182,6 +183,11 @@ public:
   void FeedTouchPoint(Dali::Integration::Point& point, int timeStamp);
 
   /**
+   * @copydoc Dali::Integration::SceneHolder::FeedMouseFrameEvent
+   */
+  void FeedMouseFrameEvent();
+
+  /**
    * @brief Get the Last Touch Event
    *
    * @return Dali::TouchEvent
@@ -412,8 +418,12 @@ protected:
 
   Uint16Pair mDpi; ///< The DPI for this SceneHolder.
 
-  bool mAdaptorStarted; ///< Whether the adaptor has started or not
-  bool mVisible : 1;    ///< Whether the scene is visible or not
+  bool                                               mAdaptorStarted; ///< Whether the adaptor has started or not
+  bool                                               mVisible : 1;    ///< Whether the scene is visible or not
+  bool                                               mHandledMultiTouch : 1;
+  Integration::TouchEvent                            mPreviousTouchEvent;
+  Integration::HoverEvent                            mPreviousHoverEvent;
+  Integration::TouchEventCombiner::EventDispatchType mPreviousType;
 };
 
 } // namespace Adaptor
index 66ee64a..4d29e74 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2023 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2024 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -61,6 +61,7 @@ EventHandler::EventHandler(WindowBase* windowBase, DamageObserver& damageObserve
     windowBase->FocusChangedSignal().Connect(this, &EventHandler::OnFocusChanged);
     windowBase->RotationSignal().Connect(this, &EventHandler::OnRotation);
     windowBase->TouchEventSignal().Connect(this, &EventHandler::OnTouchEvent);
+    windowBase->MouseFrameEventSignal().Connect(this, &EventHandler::OnMouseFrameEvent);
     windowBase->WheelEventSignal().Connect(this, &EventHandler::OnWheelEvent);
     windowBase->KeyEventSignal().Connect(this, &EventHandler::OnKeyEvent);
     windowBase->SelectionDataSendSignal().Connect(this, &EventHandler::OnSelectionDataSend);
@@ -106,6 +107,14 @@ void EventHandler::OnTouchEvent(Integration::Point& point, uint32_t timeStamp)
   }
 }
 
+void EventHandler::OnMouseFrameEvent()
+{
+  for(ObserverContainer::iterator iter = mObservers.begin(), endIter = mObservers.end(); iter != endIter; ++iter)
+  {
+    (*iter)->OnMouseFrameEvent();
+  }
+}
+
 void EventHandler::OnWheelEvent(Integration::WheelEvent& wheelEvent)
 {
   for(ObserverContainer::iterator iter = mObservers.begin(), endIter = mObservers.end(); iter != endIter; ++iter)
index 98c868a..70685f8 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_INTERNAL_EVENT_HANDLER_H
 
 /*
- * Copyright (c) 2023 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2024 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -69,6 +69,11 @@ public:
     virtual void OnTouchPoint(Dali::Integration::Point& point, int timeStamp) = 0;
 
     /**
+     * @brief Deriving classes should override this to be notified when we receive a mouse frame event.
+     */
+    virtual void OnMouseFrameEvent() = 0;
+
+    /**
      * Deriving classes should override this to be notified when we receive a wheel event.
      * @param[in] wheelEvent The wheel event
      */
@@ -157,6 +162,11 @@ private:
   void OnTouchEvent(Integration::Point& point, uint32_t timeStamp);
 
   /**
+   * Called when a mouse frame event is received.
+   */
+  void OnMouseFrameEvent();
+
+  /**
    * Called when a mouse wheel is received.
    */
   void OnWheelEvent(Integration::WheelEvent& wheelEvent);
index 4e993e0..3f5ce84 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2023 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2024 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -502,6 +502,10 @@ void GlWindow::OnTouchPoint(Dali::Integration::Point& point, int timeStamp)
   mTouchedSignal.Emit(touchEvent);
 }
 
+void GlWindow::OnMouseFrameEvent()
+{
+}
+
 void GlWindow::OnWheelEvent(Dali::Integration::WheelEvent& wheelEvent)
 {
   // TODO:
index 7df776c..46de8bb 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_INTERNAL_WINDOWSYSTEM_COMMON_GL_WINDOW_IMPL_H
 
 /*
- * Copyright (c) 2022 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2024 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -312,6 +312,11 @@ private:
   void OnTouchPoint(Dali::Integration::Point& point, int timeStamp) override;
 
   /**
+   * @copydoc Dali::Internal::Adaptor::EventHandler::Observer::OnMouseFrameEvent
+   */
+  void OnMouseFrameEvent() override;
+
+  /**
    * @copydoc Dali::Internal::Adaptor::EventHandler::Observer::OnWheelEvent
    */
   void OnWheelEvent(Dali::Integration::WheelEvent& wheelEvent) override;
index a2ff543..a067d9b 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2023 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2024 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -33,6 +33,7 @@ WindowBase::WindowBase()
   mWindowDamagedSignal(),
   mRotationSignal(),
   mTouchEventSignal(),
+  mMouseFrameEventSignal(),
   mWheelEventSignal(),
   mKeyEventSignal(),
   mSelectionDataSendSignal(),
@@ -95,6 +96,11 @@ WindowBase::TouchEventSignalType& WindowBase::TouchEventSignal()
   return mTouchEventSignal;
 }
 
+WindowBase::MouseFrameEventSignalType& WindowBase::MouseFrameEventSignal()
+{
+  return mMouseFrameEventSignal;
+}
+
 WindowBase::WheelEventSignalType& WindowBase::WheelEventSignal()
 {
   return mWheelEventSignal;
index 7774da3..c46ff17 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_INTERNAL_WINDOWSYSTEM_COMMON_WINDOW_BASE_H
 
 /*
- * Copyright (c) 2023 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2024 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -85,6 +85,7 @@ public:
 
   // Input events
   typedef Signal<void(Integration::Point&, uint32_t)> TouchEventSignalType;
+  typedef Signal<void()>                              MouseFrameEventSignalType;
   typedef Signal<void(Integration::WheelEvent&)>      WheelEventSignalType;
   typedef Signal<void(Integration::KeyEvent&)>        KeyEventSignalType;
 
@@ -553,7 +554,7 @@ public:
    */
   virtual void SetFrontBufferRendering(bool enable) = 0;
 
-    /**
+  /**
    * @brief Enables or disables front buffer rendering.
    * @return Returns whether front buffer rendering has been enabled or not.
    */
@@ -608,6 +609,11 @@ public:
   TouchEventSignalType& TouchEventSignal();
 
   /**
+   * @brief This signal is emitted when a mouse frame event is received.
+   */
+  MouseFrameEventSignalType& MouseFrameEventSignal();
+
+  /**
    * @brief This signal is emitted when a mouse wheel is received.
    */
   WheelEventSignalType& WheelEventSignal();
@@ -708,6 +714,7 @@ protected:
   DamageSignalType                        mWindowDamagedSignal;
   RotationSignalType                      mRotationSignal;
   TouchEventSignalType                    mTouchEventSignal;
+  MouseFrameEventSignalType               mMouseFrameEventSignal;
   WheelEventSignalType                    mWheelEventSignal;
   KeyEventSignalType                      mKeyEventSignal;
   SelectionSignalType                     mSelectionDataSendSignal;
index 8ea3b47..69e365f 100644 (file)
@@ -1122,6 +1122,11 @@ void Window::OnTouchPoint(Dali::Integration::Point& point, int timeStamp)
   FeedTouchPoint(point, timeStamp);
 }
 
+void Window::OnMouseFrameEvent()
+{
+  FeedMouseFrameEvent();
+}
+
 void Window::OnWheelEvent(Dali::Integration::WheelEvent& wheelEvent)
 {
   FeedWheelEvent(wheelEvent);
index 857bd4d..b0298a3 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_INTERNAL_WINDOWSYSTEM_COMMON_WINDOW_IMPL_H
 
 /*
- * Copyright (c) 2023 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2024 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -823,6 +823,11 @@ private: // Dali::Internal::Adaptor::EventHandler::Observer
   void OnTouchPoint(Dali::Integration::Point& point, int timeStamp) override;
 
   /**
+   * @copydoc Dali::Internal::Adaptor::EventHandler::Observer::OnMouseFrameEvent
+   */
+  void OnMouseFrameEvent() override;
+
+  /**
    * @copydoc Dali::Internal::Adaptor::EventHandler::Observer::OnWheelEvent
    */
   void OnWheelEvent(Dali::Integration::WheelEvent& wheelEvent) override;
@@ -1024,8 +1029,8 @@ private:
   bool mOpaqueState : 1;
   bool mWindowRotationAcknowledgement : 1;
   bool mFocused : 1;
-  bool mIsWindowRotating : 1;      ///< The window rotating flag.
-  bool mIsEnabledUserGeometry : 1; ///< The user geometry enable flag.
+  bool mIsWindowRotating : 1;            ///< The window rotating flag.
+  bool mIsEnabledUserGeometry : 1;       ///< The user geometry enable flag.
   bool mIsEmittedWindowCreatedEvent : 1; ///< The Window Created Event emit flag for accessibility.
   bool mIsFrontBufferRendering : 1;      ///< The Front Buffer Rendering state.
 };
index 674ef63..1a1f24c 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2023 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2024 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -231,6 +231,8 @@ void WindowBaseCocoa::Impl::OnMouse(NSEvent *event, PointState::Type state)
 
     // timestamp is given in seconds, the signal expects it in milliseconds
     mThis->mTouchEventSignal.Emit(point, event.timestamp * 1000);
+
+    mThis->mMouseFrameEventSignal.Emit();
   }
 }
 
index b394260..a134bdc 100644 (file)
@@ -844,6 +844,8 @@ void WindowBaseEcoreWl::OnMouseButtonDown(void* data, int type, void* event)
     point.SetDeviceSubclass(deviceSubclass);
 
     mTouchEventSignal.Emit(point, touchEvent->timestamp);
+
+    mMouseFrameEventSignal.Emit();
   }
 }
 
@@ -870,6 +872,8 @@ void WindowBaseEcoreWl::OnMouseButtonUp(void* data, int type, void* event)
     point.SetDeviceSubclass(deviceSubclass);
 
     mTouchEventSignal.Emit(point, touchEvent->timestamp);
+
+    mMouseFrameEventSignal.Emit();
   }
 }
 
@@ -896,6 +900,8 @@ void WindowBaseEcoreWl::OnMouseButtonMove(void* data, int type, void* event)
     point.SetDeviceSubclass(deviceSubclass);
 
     mTouchEventSignal.Emit(point, touchEvent->timestamp);
+
+    mMouseFrameEventSignal.Emit();
   }
 }
 
@@ -924,6 +930,8 @@ void WindowBaseEcoreWl::OnMouseButtonCancel(void* data, int type, void* event)
     mTouchEventSignal.Emit(point, touchEvent->timestamp);
 
     DALI_LOG_INFO(gWindowBaseLogFilter, Debug::General, "WindowBaseEcoreWl::OnMouseButtonCancel\n");
+
+    mMouseFrameEventSignal.Emit();
   }
 }
 
index 7ebaa1d..cfa6b9d 100644 (file)
@@ -462,6 +462,19 @@ static Eina_Bool EcoreEventMouseButtonMove(void* data, int type, void* event)
 /**
  * Called when a touch motion is received.
  */
+static Eina_Bool EcoreEventMouseFrame(void* data, int type, void* event)
+{
+  WindowBaseEcoreWl2* windowBase = static_cast<WindowBaseEcoreWl2*>(data);
+  if(windowBase)
+  {
+    windowBase->OnMouseFrame(data, type, event);
+  }
+  return ECORE_CALLBACK_PASS_ON;
+}
+
+/**
+ * Called when a touch motion is received.
+ */
 static Eina_Bool EcoreEventMouseButtonRelativeMove(void* data, int type, void* event)
 {
   WindowBaseEcoreWl2* windowBase = static_cast<WindowBaseEcoreWl2*>(data);
@@ -1019,6 +1032,9 @@ void WindowBaseEcoreWl2::Initialize(PositionSize positionSize, Any surface, bool
 
   // Register pointer lock/unlock event
   mEcoreEventHandler.PushBack(ecore_event_handler_add(ECORE_WL2_EVENT_POINTER_CONSTRAINTS, EcoreEventPointerConstraints, this));
+
+  // Register mouse frame events
+  mEcoreEventHandler.PushBack(ecore_event_handler_add(ECORE_EVENT_MOUSE_FRAME, EcoreEventMouseFrame, this));
 #endif
 
   // Register Mouse wheel events
@@ -1313,6 +1329,10 @@ void WindowBaseEcoreWl2::OnMouseButtonDown(void* data, int type, void* event)
     point.SetMouseButton(static_cast<MouseButton::Type>(touchEvent->buttons));
 
     mTouchEventSignal.Emit(point, touchEvent->timestamp);
+
+#ifndef OVER_TIZEN_VERSION_8
+    mMouseFrameEventSignal.Emit();
+#endif
   }
 }
 
@@ -1342,6 +1362,10 @@ void WindowBaseEcoreWl2::OnMouseButtonUp(void* data, int type, void* event)
     point.SetMouseButton(static_cast<MouseButton::Type>(touchEvent->buttons));
 
     mTouchEventSignal.Emit(point, touchEvent->timestamp);
+
+#ifndef OVER_TIZEN_VERSION_8
+    mMouseFrameEventSignal.Emit();
+#endif
   }
 }
 
@@ -1370,10 +1394,25 @@ void WindowBaseEcoreWl2::OnMouseButtonMove(void* data, int type, void* event)
     point.SetDeviceSubclass(deviceSubclass);
 
     mTouchEventSignal.Emit(point, touchEvent->timestamp);
+
+#ifndef OVER_TIZEN_VERSION_8
+    mMouseFrameEventSignal.Emit();
+#endif
   }
 }
 
 #ifdef OVER_TIZEN_VERSION_8
+void WindowBaseEcoreWl2::OnMouseFrame(void* data, int type, void* event)
+{
+  Ecore_Event_Mouse_Frame* MouseFrameEvent = static_cast<Ecore_Event_Mouse_Frame*>(event);
+
+  if(MouseFrameEvent->window == static_cast<unsigned int>(ecore_wl2_window_id_get(mEcoreWindow)) && Dali::Adaptor::IsAvailable())
+  {
+    DALI_TRACE_SCOPE(gTraceFilter, "DALI_ON_MOUSE_FRAME");
+    mMouseFrameEventSignal.Emit();
+  }
+}
+
 void WindowBaseEcoreWl2::OnMouseButtonRelativeMove(void* data, int type, void* event)
 {
   Ecore_Event_Mouse_Relative_Move* relativeMoveEvent = static_cast<Ecore_Event_Mouse_Relative_Move*>(event);
@@ -1421,6 +1460,10 @@ void WindowBaseEcoreWl2::OnMouseButtonCancel(void* data, int type, void* event)
 
     mTouchEventSignal.Emit(point, touchEvent->timestamp);
 
+#ifndef OVER_TIZEN_VERSION_8
+    mMouseFrameEventSignal.Emit();
+#endif
+
     DALI_LOG_INFO(gWindowBaseLogFilter, Debug::General, "WindowBaseEcoreWl2::OnMouseButtonCancel\n");
   }
 }
index 4ec38e0..1f0bbba 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_INTERNAL_WINDOWSYSTEM_TIZENWAYLAND_WINDOW_BASE_ECORE_WL2_H
 
 /*
- * Copyright (c) 2023 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2024 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -106,6 +106,11 @@ public:
   void OnMouseButtonMove(void* data, int type, void* event);
 
   /**
+   * @brief Called when a mouse frame is received.
+   */
+  void OnMouseFrame(void* data, int type, void* event);
+
+  /**
    * @brief Called when a touch motion is received.
    */
   void OnMouseButtonRelativeMove(void* data, int type, void* event);
index fdcfa56..c030877 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2023 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2024 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -475,6 +475,8 @@ void WindowBaseEcoreX::OnMouseButtonDown(void* data, int type, void* event)
     }
 
     mTouchEventSignal.Emit(point, touchEvent->timestamp);
+
+    mMouseFrameEventSignal.Emit();
   }
 }
 
@@ -497,6 +499,8 @@ void WindowBaseEcoreX::OnMouseButtonUp(void* data, int type, void* event)
     }
 
     mTouchEventSignal.Emit(point, touchEvent->timestamp);
+
+    mMouseFrameEventSignal.Emit();
   }
 }
 
@@ -515,6 +519,8 @@ void WindowBaseEcoreX::OnMouseButtonMove(void* data, int type, void* event)
     point.SetAngle(Degree(static_cast<float>(touchEvent->multi.angle)));
 
     mTouchEventSignal.Emit(point, touchEvent->timestamp);
+
+    mMouseFrameEventSignal.Emit();
   }
 }
 
index 28f67a1..19e9cea 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2023 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2024 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -132,6 +132,8 @@ void WindowBaseWin::OnMouseButtonDown(int type, TWinEventInfo* event)
     point.SetAngle(Degree(touchEvent.multi.angle));
 
     mTouchEventSignal.Emit(point, touchEvent.timestamp);
+
+    mMouseFrameEventSignal.Emit();
   }
 }
 
@@ -156,6 +158,8 @@ void WindowBaseWin::OnMouseButtonUp(int type, TWinEventInfo* event)
     point.SetAngle(Degree(touchEvent.multi.angle));
 
     mTouchEventSignal.Emit(point, touchEvent.timestamp);
+
+    mMouseFrameEventSignal.Emit();
   }
 }
 
@@ -180,6 +184,8 @@ void WindowBaseWin::OnMouseButtonMove(int type, TWinEventInfo* event)
     point.SetAngle(Degree(touchEvent.multi.angle));
 
     mTouchEventSignal.Emit(point, touchEvent.timestamp);
+
+    mMouseFrameEventSignal.Emit();
   }
 }
 
index da239ee..e5fdce2 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2023 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2024 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -480,6 +480,8 @@ void WindowBaseX::OnMouseButtonDown(void* data, WindowSystemBase::Event type, Wi
     }
 
     mTouchEventSignal.Emit(point, touchEvent->timestamp);
+
+    mMouseFrameEventSignal.Emit();
   }
 }
 
@@ -503,6 +505,8 @@ void WindowBaseX::OnMouseButtonUp(void* data, WindowSystemBase::Event type, Wind
     }
 
     mTouchEventSignal.Emit(point, touchEvent->timestamp);
+
+    mMouseFrameEventSignal.Emit();
   }
 }
 
@@ -521,6 +525,8 @@ void WindowBaseX::OnMouseButtonMove(void* data, WindowSystemBase::Event type, Wi
     point.SetAngle(Degree(static_cast<float>(touchEvent->multi.angle)));
 
     mTouchEventSignal.Emit(point, touchEvent->timestamp);
+
+    mMouseFrameEventSignal.Emit();
   }
 }