X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/facd6764872eede45605ba7c9dfa0e1d0c708fa2..56d061c578db49bb2dc98ccf34559d3027982a3b:/src/mac/carbon/tooltip.cpp diff --git a/src/mac/carbon/tooltip.cpp b/src/mac/carbon/tooltip.cpp index 934ef3e624..f2793110dd 100644 --- a/src/mac/carbon/tooltip.cpp +++ b/src/mac/carbon/tooltip.cpp @@ -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 ;