git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@38622
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
#if TARGET_API_MAC_OSX
const int countPages = GetPageCount();
#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 );
HIViewPartCode outPart = 0 ;
OSStatus err = HIViewGetPartHit( m_peer->GetControlRef(), &hipoint, &outPart );