- HIPoint hiPoint ;
- hiPoint.x = pt->x ;
- hiPoint.y = pt->y ;
- HIViewConvertPoint( &hiPoint , from->m_controlRef , to->m_controlRef ) ;
- pt->x = (int)hiPoint.x ;
- pt->y = (int)hiPoint.y ;
-#else
- Rect fromRect ;
- Rect toRect ;
- from->GetRect( &fromRect ) ;
- to->GetRect( &toRect ) ;
-
- // correct the case of the root control
- if ( fromRect.left == -32768 && fromRect.top == -32768 && fromRect.bottom == 32767 && fromRect.right == 32767)
- fromRect.left = fromRect.top = 0 ;
-
- if ( toRect.left == -32768 && toRect.top == -32768 && toRect.bottom == 32767 && toRect.right == 32767 )
- toRect.left = toRect.top = 0 ;
-
- pt->x = pt->x + fromRect.left - toRect.left ;
- pt->y = pt->y + fromRect.top - toRect.top ;
+ if ( from->m_peer->MacGetTopLevelWindow()->MacUsesCompositing() )
+ {
+ HIPoint hiPoint ;
+ hiPoint.x = pt->x ;
+ hiPoint.y = pt->y ;
+ HIViewConvertPoint( &hiPoint , from->m_controlRef , to->m_controlRef ) ;
+ pt->x = (int)hiPoint.x ;
+ pt->y = (int)hiPoint.y ;
+ }
+ else