- HIPointConvert( &p, kHICoordSpace72DPIGlobal, NULL, kHICoordSpaceWindow, window );
+ HIViewRef contentView ;
+ // TODO check toolbar offset
+ HIViewFindByID( HIViewGetRoot( window ), kHIViewWindowContentID , &contentView) ;
+ HIPointConvert( &p, kHICoordSpace72DPIGlobal, NULL, kHICoordSpaceView, contentView );