summaryrefslogtreecommitdiff
path: root/src/corelib/gdi
diff options
context:
space:
mode:
Diffstat (limited to 'src/corelib/gdi')
-rw-r--r--src/corelib/gdi/fpg_gdi.pas11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/corelib/gdi/fpg_gdi.pas b/src/corelib/gdi/fpg_gdi.pas
index 9eb9f952..f655de2b 100644
--- a/src/corelib/gdi/fpg_gdi.pas
+++ b/src/corelib/gdi/fpg_gdi.pas
@@ -312,6 +312,7 @@ uses
var
wapplication: TfpgApplication;
+ uDragSource: TfpgWidget; { points to the Source widget of the DND when drop is inside the same app }
MouseFocusedWH: HWND;
OldMousePos: TPoint; // used to detect fake MouseMove events
NeedToUnitialize: Boolean;
@@ -1375,6 +1376,7 @@ procedure TfpgGDIWindow.HandleDNDEnter(Sender: TObject; DataObj: IDataObject;
KeyState: Longint; PT: TPoint; var Effect: DWORD);
var
wg: TfpgWidget;
+ swg: TfpgWidget;
lMimeList: TStringList;
lMimeChoice: TfpgString;
lAccept: Boolean;
@@ -1401,7 +1403,13 @@ begin
lDropAction := TranslateToFPGDropAction(Effect);
if Assigned(wg.OnDragEnter) then
- wg.OnDragEnter(self, nil, lMimeList, lMimeChoice, lDropAction, lAccept);
+ begin
+ if Assigned(uDragSource) then
+ swg := uDragSource as TfpgWidget
+ else
+ swg := nil;
+ wg.OnDragEnter(self, swg, lMimeList, lMimeChoice, lDropAction, lAccept);
+ end;
finally
lMimeList.Free;
end;
@@ -2890,6 +2898,7 @@ begin
end;
end;
+ uDragSource := TfpgDrag(self).Source as TfpgWidget;
{ Now let OLE take over from here }
FDropSource := TfpgOLEDropSource.Create;
dwResult := ActiveX.DoDragDrop( FDataObject as IDataObject,