]> git.saurik.com Git - wxWidgets.git/blobdiff - src/mac/carbon/tooltip.cpp
removing unnecessary invalidation in Update, adding a forced update to ScrollWindow...
[wxWidgets.git] / src / mac / carbon / tooltip.cpp
index 934ef3e624f679aae62e014d1444ffa188327447..acd76b39a0b52492aee1289ea3a28668e9a00997 100644 (file)
@@ -4,7 +4,7 @@
 // Author:      Robert Roebling
 // Id:          $Id$
 // Copyright:   (c) 1998 Robert Roebling
-// Licence:     wxWindows licence
+// Licence:     wxWidgets licence
 /////////////////////////////////////////////////////////////////////////////
 
 #ifdef __GNUG__
@@ -228,11 +228,11 @@ void wxMacToolTip::Draw()
         tag.version = kMacHelpVersion;
         SetRect( &tag.absHotRect , m_position.x - 2 , m_position.y - 2 , m_position.x + 2 , m_position.y + 2 ) ;
         GrafPtr port ;
-        GetPort( &port ) ;
-        SetPortWindowPort(m_window) ;
+        bool swapped = QDSwapPort( GetWindowPort( m_window ) , &port ) ;
         LocalToGlobal( (Point *) &tag.absHotRect.top );
         LocalToGlobal( (Point *) &tag.absHotRect.bottom );
-        SetPort( port );
+        if ( swapped )
+            SetPort( port );
         m_helpTextRef.Assign( m_label  , wxFONTENCODING_DEFAULT ) ;
         tag.content[kHMMinimumContentIndex].contentType = kHMCFStringContent ;
         tag.content[kHMMinimumContentIndex].u.tagCFString = m_helpTextRef ;