Skip to content

Commit

Permalink
[win] Add mouse coordinates to DropFilesMessage indicating the point …
Browse files Browse the repository at this point in the history
…where the drop of files took place on the target window
  • Loading branch information
martincapello committed Feb 27, 2024
1 parent 32557b8 commit fd6f0fb
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions os/win/window.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit fd6f0fb

Please sign in to comment.