diff options
Diffstat (limited to 'src/corelib')
-rw-r--r-- | src/corelib/gdi/fpg_gdi.pas | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/corelib/gdi/fpg_gdi.pas b/src/corelib/gdi/fpg_gdi.pas index c8460a4c..74787683 100644 --- a/src/corelib/gdi/fpg_gdi.pas +++ b/src/corelib/gdi/fpg_gdi.pas @@ -1522,6 +1522,7 @@ var swg: TfpgWidget; { source widget } CF: DWORD; lIsTranslated: Boolean; + lPoint: Windows.Point; begin if not FUserAcceptDrag then exit; @@ -1547,7 +1548,11 @@ begin swg := uDragSource as TfpgWidget else swg := nil; - wg.OnDragDrop(wg, swg, pt.x, pt.y, data); + // convert mouse screen coordinates to widget coordinates + lPoint.x := pt.x; + lPoint.y := pt.y; + ScreenToClient(wg.WinHandle, lPoint); + wg.OnDragDrop(wg, swg, lPoint.x, lPoint.y, data); uDragSource := nil; end; GlobalUnlock(stgmed.HGLOBAL); |