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:
@@ -497,20 +497,20 @@ pascal OSErr wxMacWindowDragTrackingHandler(DragTrackingMessage theMessage, Wind
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
// if (attributes & kDragHasLeftSenderWindow)
|
|
||||||
{
|
{
|
||||||
// wxPoint point(localMouse.h , localMouse.v) ;
|
|
||||||
wxWindow *win = NULL ;
|
wxWindow *win = NULL ;
|
||||||
ControlPartCode controlPart ;
|
ControlPartCode controlPart ;
|
||||||
ControlRef control = wxMacFindControlUnderMouse( toplevel , localMouse ,
|
ControlRef control = wxMacFindControlUnderMouse( toplevel , localMouse ,
|
||||||
theWindow , &controlPart ) ;
|
theWindow , &controlPart ) ;
|
||||||
if ( control )
|
if ( control )
|
||||||
win = wxFindControlFromMacControl( control ) ;
|
win = wxFindControlFromMacControl( control ) ;
|
||||||
// TODO toplevel->MacGetWindowFromPointSub( point , &win ) ;
|
else
|
||||||
|
win = toplevel ;
|
||||||
|
|
||||||
int localx , localy ;
|
int localx , localy ;
|
||||||
localx = localMouse.h ;
|
localx = localMouse.h ;
|
||||||
localy = localMouse.v ;
|
localy = localMouse.v ;
|
||||||
//TODO : should we use client coordinates
|
|
||||||
if ( win )
|
if ( win )
|
||||||
win->MacRootWindowToWindow( &localx , &localy ) ;
|
win->MacRootWindowToWindow( &localx , &localy ) ;
|
||||||
if ( win != trackingGlobals->m_currentTargetWindow )
|
if ( win != trackingGlobals->m_currentTargetWindow )
|
||||||
@@ -601,8 +601,7 @@ pascal OSErr wxMacWindowDragTrackingHandler(DragTrackingMessage theMessage, Wind
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
// MyTrackItemUnderMouse(localMouse, theWindow);
|
|
||||||
break;
|
break;
|
||||||
case kDragTrackingLeaveWindow:
|
case kDragTrackingLeaveWindow:
|
||||||
if (trackingGlobals->m_currentTarget)
|
if (trackingGlobals->m_currentTarget)
|
||||||
|
Reference in New Issue
Block a user