(Resend) ole2 fix DoDragDrop in case of child windows

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



a patch broke it 2 years ago.

If a drop target like ShellView has a visible child (ListView) DragEnter and DragLeave are
called every time the mouse moves since the function compares the false HWND. DragOver will be called
never.


Anhänge:
  E:\wine\ole2.dif

--
juergen.schmied@debitel.net
FAX über T-Online Fax&Fon: 01805 060 334 316 35 (12Cent/Min)



Index: wine/dlls/ole32/ole2.c
===================================================================
RCS file: /home/wine/wine/dlls/ole32/ole2.c,v
retrieving revision 1.41
diff -d -u -w -B -r1.41 ole2.c
--- wine/dlls/ole32/ole2.c	14 Jan 2003 19:32:14 -0000	1.41
+++ wine/dlls/ole32/ole2.c	19 Jan 2003 01:47:18 -0000
@@ -76,7 +75,8 @@
   HRESULT      returnValue;
 
   BOOL       escPressed;
-  HWND       curDragTargetHWND;
+  HWND       curTargetHWND;	/* window the mouse is hovering over */
+  HWND       curDragTargetHWND; /* might be a ancestor of curTargetHWND */
   IDropTarget* curDragTarget;
 } TrackerWindowInfo;
 
@@ -551,6 +551,7 @@
   trackerInfo.trackingDone      = FALSE;
   trackerInfo.escPressed        = FALSE;
   trackerInfo.curDragTargetHWND = 0;
+  trackerInfo.curTargetHWND     = 0;
   trackerInfo.curDragTarget     = 0;
 
   hwndTrackWindow = CreateWindowA(OLEDD_DRAGTRACKERCLASS,
@@ -1919,8 +1920,9 @@
    * If we are hovering over the same target as before, send the
    * DragOver notification
    */
+  trackerInfo->curDragTargetHWND, hwndNewTarget);
   if ( (trackerInfo->curDragTarget != 0) &&
-       (trackerInfo->curDragTargetHWND==hwndNewTarget) )
+       (trackerInfo->curTargetHWND == hwndNewTarget) )
   {
     POINTL  mousePosParam;
 
@@ -1959,6 +1961,8 @@
        * Find-out if there is a drag target under the mouse
        */
       HWND nexttar = hwndNewTarget;
+      trackerInfo->curTargetHWND = hwndNewTarget;
+
       do {
 	newDropTargetNode = OLEDD_FindDropTarget(nexttar);
       } while (!newDropTargetNode && (nexttar = GetParent(nexttar)) != 0);
@@ -1995,6 +1998,7 @@
        * The mouse is not over a window so we don't track anything.
        */
       trackerInfo->curDragTargetHWND = 0;
+      trackerInfo->curTargetHWND     = 0;
       trackerInfo->curDragTarget     = 0;
     }
   }

[Index of Archives]     [Gimp for Windows]     [Red Hat]     [Samba]     [Yosemite Camping]     [Graphics Cards]     [Wine Home]

  Powered by Linux