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; }
/***
On Mon, Feb 17, 2020 at 12:02:01PM +0100, Roman Pišl wrote:
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(+)
Hi Roman,
So what happened to the tests?
Huw.
Hi Huw, my mistake. But after few more experiments I've discovered that the actual problem is in the timer. Attached you will find another solution for the bug, that seems less invasive and cleaner to me. But now it also seems that the test doesn't actually test "reentrancy" but just an implementation difference/fault in Wine - timer that could arrive while processing QueryContinueDrag. Isn't such a test just overkill?
Which solution is better and how should I proceed?
Thanks.
Roman
Dne 17. 02. 20 v 14:24 Huw Davies napsal(a):
On Mon, Feb 17, 2020 at 12:02:01PM +0100, Roman Pišl wrote:
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(+)
Hi Roman,
So what happened to the tests?
Huw.
Hi,
While running your changed tests, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check?
Full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=65324
Your paranoid android.
=== debian10 (32 bit Chinese:China report) ===
ole32: clipboard.c:1051: Test failed: OleIsCurrentClipboard returned 0 clipboard.c:1119: Test failed: 1 WM_DRAWCLIPBOARD received