From: Stefan Csomor Date: Tue, 23 Aug 2005 07:43:41 +0000 (+0000) Subject: cleanup and adding the case when the toplevel window itself is the recipient of the... X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/7adabb9ae827616887ef193a8d7b339de2bb55fb cleanup and adding the case when the toplevel window itself is the recipient of the drag git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@35278 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/mac/carbon/dnd.cpp b/src/mac/carbon/dnd.cpp index d02ba3a18b..a84bce9196 100644 --- a/src/mac/carbon/dnd.cpp +++ b/src/mac/carbon/dnd.cpp @@ -497,20 +497,20 @@ pascal OSErr wxMacWindowDragTrackingHandler(DragTrackingMessage theMessage, Wind -// if (attributes & kDragHasLeftSenderWindow) { -// wxPoint point(localMouse.h , localMouse.v) ; wxWindow *win = NULL ; ControlPartCode controlPart ; ControlRef control = wxMacFindControlUnderMouse( toplevel , localMouse , theWindow , &controlPart ) ; if ( control ) win = wxFindControlFromMacControl( control ) ; - // TODO toplevel->MacGetWindowFromPointSub( point , &win ) ; + else + win = toplevel ; + int localx , localy ; localx = localMouse.h ; localy = localMouse.v ; - //TODO : should we use client coordinates + if ( win ) win->MacRootWindowToWindow( &localx , &localy ) ; if ( win != trackingGlobals->m_currentTargetWindow ) @@ -601,8 +601,7 @@ pascal OSErr wxMacWindowDragTrackingHandler(DragTrackingMessage theMessage, Wind } } - } - // MyTrackItemUnderMouse(localMouse, theWindow); + } break; case kDragTrackingLeaveWindow: if (trackingGlobals->m_currentTarget)