X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/939fba6c17da245488a77a3f58e983180fc5de91..09155be84e2240da3977cf3629c42d412177a570:/src/mac/carbon/dnd.cpp diff --git a/src/mac/carbon/dnd.cpp b/src/mac/carbon/dnd.cpp index 22ced39ede..5744c01f3d 100644 --- a/src/mac/carbon/dnd.cpp +++ b/src/mac/carbon/dnd.cpp @@ -463,7 +463,12 @@ pascal OSErr wxMacWindowDragTrackingHandler(DragTrackingMessage theMessage, Wind { wxPoint point(localMouse.h , localMouse.v) ; wxWindow *win = NULL ; - toplevel->MacGetWindowFromPointSub( point , &win ) ; + ControlPartCode controlPart ; + ControlRef control = wxMacFindControlUnderMouse( localMouse , + theWindow , &controlPart ) ; + if ( control ) + win = wxFindControlFromMacControl( control ) ; + // TODO toplevel->MacGetWindowFromPointSub( point , &win ) ; int localx , localy ; localx = localMouse.h ; localy = localMouse.v ; @@ -505,7 +510,8 @@ pascal OSErr wxMacWindowDragTrackingHandler(DragTrackingMessage theMessage, Wind x = y = 0 ; win->MacWindowToRootWindow( &x , &y ) ; RgnHandle hiliteRgn = NewRgn() ; - SetRectRgn( hiliteRgn , x , y , x+win->GetSize().x ,y+win->GetSize().y) ; + Rect r = { y , x , y+win->GetSize().y , x+win->GetSize().x } ; + RectRgn( hiliteRgn , &r ) ; ShowDragHilite(theDrag, hiliteRgn, true); DisposeRgn( hiliteRgn ) ; }