changing coordinates to client-area relative (patch 1378189)

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@38622 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Stefan Csomor 2006-04-08 14:33:00 +00:00
parent 51478cd68d
commit 2fbfb7d6fb

View File

@ -322,7 +322,13 @@ int wxNotebook::HitTest(const wxPoint& pt, long * flags) const
#if TARGET_API_MAC_OSX
const int countPages = GetPageCount();
HIPoint hipoint = { pt.x , pt.y } ;
// we have to convert from Client to Window relative coordinates
wxPoint adjustedPt = pt + GetClientAreaOrigin();
// and now to HIView native ones
adjustedPt.x -= MacGetLeftBorderSize() ;
adjustedPt.y -= MacGetTopBorderSize() ;
HIPoint hipoint= { adjustedPt.x , adjustedPt.y } ;
HIViewPartCode outPart = 0 ;
OSStatus err = HIViewGetPartHit( m_peer->GetControlRef(), &hipoint, &outPart );