adding QDSwapPort for performance reasons

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@26578 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Stefan Csomor
2004-04-02 08:37:46 +00:00
parent 943b730f1f
commit bb253bfd67
3 changed files with 11 additions and 10 deletions

View File

@@ -909,10 +909,10 @@ void wxWindowMac::MacGetPositionAndSizeFromControl(int& x, int& y,
{
Point tlworigin = { 0 , 0 } ;
GrafPtr port ;
::GetPort( &port ) ;
::SetPort( UMAGetWindowPort( (WindowRef) tlw->MacGetWindowRef() ) ) ;
bool swapped = QDSwapPort( UMAGetWindowPort( (WindowRef) tlw->MacGetWindowRef() ) , &port ) ;
::LocalToGlobal( &tlworigin ) ;
::SetPort( port ) ;
if ( swapped )
::SetPort( port ) ;
x = tlworigin.h ;
y = tlworigin.v ;
}