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:
parent
51478cd68d
commit
2fbfb7d6fb
@ -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 );
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user