X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/e6c3d3e655c4637764f60eb28a3d7e7ed3d9732b..80a779275ae04443c568dca919adb26cf6f5002c:/src/mac/carbon/utils.cpp?ds=sidebyside diff --git a/src/mac/carbon/utils.cpp b/src/mac/carbon/utils.cpp index 929be2b656..119e67de76 100644 --- a/src/mac/carbon/utils.cpp +++ b/src/mac/carbon/utils.cpp @@ -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