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
This commit is contained in:
Stefan Csomor
2005-08-23 07:43:41 +00:00
parent 0b6db82f16
commit 7adabb9ae8

View File

@@ -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)