From 2877659b059c5d20b07b585e26391dfd9ed780a2 Mon Sep 17 00:00:00 2001 From: Stefan Csomor Date: Sun, 11 Apr 2004 15:17:57 +0000 Subject: [PATCH] fixing target determination for compositing windows, but we don't always get proper highlights for target windows git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@26708 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/mac/carbon/dnd.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/mac/carbon/dnd.cpp b/src/mac/carbon/dnd.cpp index 9ffa32aafa..5744c01f3d 100644 --- a/src/mac/carbon/dnd.cpp +++ b/src/mac/carbon/dnd.cpp @@ -463,6 +463,11 @@ pascal OSErr wxMacWindowDragTrackingHandler(DragTrackingMessage theMessage, Wind { wxPoint point(localMouse.h , localMouse.v) ; wxWindow *win = NULL ; + ControlPartCode controlPart ; + ControlRef control = wxMacFindControlUnderMouse( localMouse , + theWindow , &controlPart ) ; + if ( control ) + win = wxFindControlFromMacControl( control ) ; // TODO toplevel->MacGetWindowFromPointSub( point , &win ) ; int localx , localy ; localx = localMouse.h ; @@ -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 ) ; } -- 2.50.0