From fd6f0fb63f56fcd41ab899158fe198fd161bb8b8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mart=C3=ADn=20Capello?= Date: Tue, 27 Feb 2024 18:15:28 -0300 Subject: [PATCH] [win] Add mouse coordinates to DropFilesMessage indicating the point where the drop of files took place on the target window --- os/win/window.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/os/win/window.cpp b/os/win/window.cpp index 1914cf877..6af9d8b6d 100644 --- a/os/win/window.cpp +++ b/os/win/window.cpp @@ -1751,11 +1751,15 @@ LRESULT WindowWin::wndProc(UINT msg, WPARAM wparam, LPARAM lparam) } } - DragFinish(hdrop); - Event ev; ev.setType(Event::DropFiles); ev.setFiles(files); + POINT ppt; + if (DragQueryPoint(hdrop, &ppt)) + ev.setPosition(gfx::Point(ppt.x, ppt.y)); + + DragFinish(hdrop); + queueEvent(ev); break; }