From 9216ceb48dbb37ee3ee5d370190a20ee564bf4ea Mon Sep 17 00:00:00 2001 From: Taehyub Kim Date: Thu, 5 Jan 2023 10:35:23 +0900 Subject: [PATCH] drag-and-drop : Add leave event when dragging is cancelled Change-Id: I98125d2e8636976cc986f019a65f3a268853f7ca --- .../drag-and-drop/tizen-wayland/drag-and-drop-impl-ecore-wl2.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/dali/internal/drag-and-drop/tizen-wayland/drag-and-drop-impl-ecore-wl2.cpp b/dali/internal/drag-and-drop/tizen-wayland/drag-and-drop-impl-ecore-wl2.cpp index b6654e6..881c9b0 100644 --- a/dali/internal/drag-and-drop/tizen-wayland/drag-and-drop-impl-ecore-wl2.cpp +++ b/dali/internal/drag-and-drop/tizen-wayland/drag-and-drop-impl-ecore-wl2.cpp @@ -260,6 +260,15 @@ void DragAndDropEcoreWl::ResetDropTargets() { for(std::size_t i = 0; i < mDropTargets.size(); i++) { + if(mDropTargets[i].inside) + { + Dali::DragAndDrop::DragEvent dragEvent; + dragEvent.SetAction(Dali::DragAndDrop::DragType::LEAVE); + // -1 means the default position when dragging is cancelled + Dali::Vector2 position(-1, -1); + dragEvent.SetPosition(position); + mDropTargets[i].callback(dragEvent); + } mDropTargets[i].inside = false; } } -- 2.7.4