From: Taehyub Kim Date: Thu, 5 Jan 2023 01:35:23 +0000 (+0900) Subject: drag-and-drop : Add leave event when dragging is cancelled X-Git-Tag: accepted/tizen/unified/20230111.174540~1^2~1^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=9216ceb48dbb37ee3ee5d370190a20ee564bf4ea;p=platform%2Fcore%2Fuifw%2Fdali-adaptor.git drag-and-drop : Add leave event when dragging is cancelled Change-Id: I98125d2e8636976cc986f019a65f3a268853f7ca --- 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; } }