Nikolay Sivov : ole32/ole2: If no effect action selected use ::DragLeave() instead of ::Drop().

Alexandre Julliard julliard at winehq.org
Mon May 3 11:54:06 CDT 2010


Module: wine
Branch: master
Commit: f3ab3d971a793f7fa16d7ae3853a878d3c5546b7
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=f3ab3d971a793f7fa16d7ae3853a878d3c5546b7

Author: Nikolay Sivov <nsivov at codeweavers.com>
Date:   Sun May  2 12:56:47 2010 +0400

ole32/ole2: If no effect action selected use ::DragLeave() instead of ::Drop().

---

 dlls/ole32/ole2.c |   20 +++++++++++---------
 1 files changed, 11 insertions(+), 9 deletions(-)

diff --git a/dlls/ole32/ole2.c b/dlls/ole32/ole2.c
index b20be1d..2e4da53 100644
--- a/dlls/ole32/ole2.c
+++ b/dlls/ole32/ole2.c
@@ -2196,7 +2196,7 @@ static void OLEDD_TrackStateChange(TrackerWindowInfo* trackerInfo)
      * If we end-up over a target, drop the object in the target or
      * inform the target that the operation was cancelled.
      */
-    if (trackerInfo->curDragTarget!=0)
+    if (trackerInfo->curDragTarget)
     {
       switch (trackerInfo->returnValue)
       {
@@ -2205,14 +2205,16 @@ static void OLEDD_TrackStateChange(TrackerWindowInfo* trackerInfo)
 	 * the drop target that we just dropped the object in it.
 	 */
         case DRAGDROP_S_DROP:
-	{
-	  IDropTarget_Drop(trackerInfo->curDragTarget,
-			   trackerInfo->dataObject,
-                           trackerInfo->dwKeyState,
-                           trackerInfo->curMousePos,
-			   trackerInfo->pdwEffect);
-	  break;
-	}
+          if (*trackerInfo->pdwEffect != DROPEFFECT_NONE)
+            IDropTarget_Drop(trackerInfo->curDragTarget,
+                             trackerInfo->dataObject,
+                             trackerInfo->dwKeyState,
+                             trackerInfo->curMousePos,
+                             trackerInfo->pdwEffect);
+          else
+            IDropTarget_DragLeave(trackerInfo->curDragTarget);
+          break;
+
 	/*
 	 * If the source told us that we should cancel, fool the drop
 	 * target by telling it that the mouse left it's window.




More information about the wine-cvs mailing list