ole32/ole2: After IDropTarget::DragEnter() failure target doesn't count as valid.

This commit is contained in:
Nikolay Sivov 2010-05-02 12:49:37 +04:00 committed by Alexandre Julliard
parent 071d16d624
commit 9c44ed8a6b
1 changed files with 14 additions and 6 deletions

View File

@ -2081,13 +2081,21 @@ static void OLEDD_TrackMouseMove(TrackerWindowInfo* trackerInfo)
/*
* If there is, notify it that we just dragged-in
*/
if (trackerInfo->curDragTarget!=0)
if (trackerInfo->curDragTarget)
{
IDropTarget_DragEnter(trackerInfo->curDragTarget,
trackerInfo->dataObject,
trackerInfo->dwKeyState,
trackerInfo->curMousePos,
trackerInfo->pdwEffect);
hr = IDropTarget_DragEnter(trackerInfo->curDragTarget,
trackerInfo->dataObject,
trackerInfo->dwKeyState,
trackerInfo->curMousePos,
trackerInfo->pdwEffect);
/* failed DragEnter() means invalid target */
if (hr != S_OK)
{
trackerInfo->curDragTargetHWND = 0;
trackerInfo->curTargetHWND = 0;
trackerInfo->curDragTarget = 0;
}
}
}
else