]> git.saurik.com Git - wxWidgets.git/blobdiff - src/mac/carbon/tooltip.cpp
workaround because regions that were built up, were sometimes being drawn on the...
[wxWidgets.git] / src / mac / carbon / tooltip.cpp
index acd76b39a0b52492aee1289ea3a28668e9a00997..0c16019c4745148ac7a4ddbbaa3cf461152990ff 100644 (file)
@@ -1,17 +1,17 @@
 /////////////////////////////////////////////////////////////////////////////
 // Name:        tooltip.cpp
 // Purpose:     wxToolTip implementation
-// Author:      Robert Roebling
+// Author:      Stefan Csomor
 // Id:          $Id$
-// Copyright:   (c) 1998 Robert Roebling
-// Licence:     wxWidgets licence
+// Copyright:   (c) Stefan Csomor
+// Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
 
-#ifdef __GNUG__
+#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
     #pragma implementation "tooltip.h"
 #endif
 
-#include "wx/defs.h"
+#include "wx/wxprec.h"
 
 #if wxUSE_TOOLTIPS
 
@@ -227,12 +227,9 @@ void wxMacToolTip::Draw()
         HMHelpContentRec tag ;
         tag.version = kMacHelpVersion;
         SetRect( &tag.absHotRect , m_position.x - 2 , m_position.y - 2 , m_position.x + 2 , m_position.y + 2 ) ;
-        GrafPtr port ;
-        bool swapped = QDSwapPort( GetWindowPort( m_window ) , &port ) ;
-        LocalToGlobal( (Point *) &tag.absHotRect.top );
-        LocalToGlobal( (Point *) &tag.absHotRect.bottom );
-        if ( swapped )
-            SetPort( port );
+
+        QDLocalToGlobalRect( GetWindowPort( m_window ) , &tag.absHotRect ) ;
+
         m_helpTextRef.Assign( m_label  , wxFONTENCODING_DEFAULT ) ;
         tag.content[kHMMinimumContentIndex].contentType = kHMCFStringContent ;
         tag.content[kHMMinimumContentIndex].u.tagCFString = m_helpTextRef ;