Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=48569
Signed-off-by: Roman Pišl rpisl@seznam.cz --- dlls/ole32/ole2.c | 11 +++++++++++ 1 file changed, 11 insertions(+)
diff --git a/dlls/ole32/ole2.c b/dlls/ole32/ole2.c index 757458ad20..e971bcbf34 100644 --- a/dlls/ole32/ole2.c +++ b/dlls/ole32/ole2.c @@ -62,6 +62,7 @@ typedef struct tagTrackerWindowInfo DWORD dwOKEffect; DWORD* pdwEffect; BOOL trackingDone; + BOOL inTrackCall; HRESULT returnValue;
BOOL escPressed; @@ -766,6 +767,7 @@ HRESULT WINAPI DoDragDrop ( trackerInfo.dwOKEffect = dwOKEffect; trackerInfo.pdwEffect = pdwEffect; trackerInfo.trackingDone = FALSE; + trackerInfo.inTrackCall = FALSE; trackerInfo.escPressed = FALSE; trackerInfo.curTargetHWND = 0; trackerInfo.curDragTarget = 0; @@ -2284,6 +2286,13 @@ static void OLEDD_TrackStateChange(TrackerWindowInfo* trackerInfo) HWND hwndNewTarget = 0; POINT pt;
+ /* + * This method may be called from QueryContinueDrag again, + * (i.e. by running message loop) so avoid recursive call chain. + */ + if (trackerInfo->inTrackCall) return; + trackerInfo->inTrackCall = TRUE; + /* * Get the handle of the window under the mouse */ @@ -2329,6 +2338,8 @@ static void OLEDD_TrackStateChange(TrackerWindowInfo* trackerInfo) } else drag_end( trackerInfo ); + + trackerInfo->inTrackCall = FALSE; }
/***