fixing coordinate conversions

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@42074 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Stefan Csomor 2006-10-17 09:27:46 +00:00
parent edba2de33e
commit daca43d847

View File

@ -2356,7 +2356,10 @@ void wxMacGlobalToLocal( WindowRef window , Point*pt )
{
#if MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_4
HIPoint p = CGPointMake( pt->h, pt->v );
HIPointConvert( &p, kHICoordSpace72DPIGlobal, NULL, kHICoordSpaceWindow, window );
HIViewRef contentView ;
// TODO check toolbar offset
HIViewFindByID( HIViewGetRoot( window ), kHIViewWindowContentID , &contentView) ;
HIPointConvert( &p, kHICoordSpace72DPIGlobal, NULL, kHICoordSpaceView, contentView );
pt->h = p.x;
pt->v = p.y;
#else
@ -2368,7 +2371,10 @@ void wxMacLocalToGlobal( WindowRef window , Point*pt )
{
#if MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_4
HIPoint p = CGPointMake( pt->h, pt->v );
HIPointConvert( &p, kHICoordSpaceWindow, window, kHICoordSpace72DPIGlobal, NULL );
HIViewRef contentView ;
// TODO check toolbar offset
HIViewFindByID( HIViewGetRoot( window ), kHIViewWindowContentID , &contentView) ;
HIPointConvert( &p, kHICoordSpaceView, contentView, kHICoordSpace72DPIGlobal, NULL );
pt->h = p.x;
pt->v = p.y;
#else