summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
943b730)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@26578
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
wxMacFastPortSetter( const wxDC *dc )
{
wxASSERT( dc->Ok() ) ;
wxMacFastPortSetter( const wxDC *dc )
{
wxASSERT( dc->Ok() ) ;
- GetPort( &m_oldPort ) ;
- SetPort( (GrafPtr) dc->m_macPort ) ;
+ m_swapped = QDSwapPort( (GrafPtr) dc->m_macPort , &m_oldPort ) ;
m_clipRgn = NewRgn() ;
GetClip( m_clipRgn ) ;
m_dc = dc ;
m_clipRgn = NewRgn() ;
GetClip( m_clipRgn ) ;
m_dc = dc ;
}
~wxMacFastPortSetter()
{
}
~wxMacFastPortSetter()
{
- SetPort( (GrafPtr) m_dc->m_macPort ) ;
+ // SetPort( (GrafPtr) m_dc->m_macPort ) ;
+ if ( m_swapped )
+ SetPort( m_oldPort ) ;
m_dc->MacCleanupPort( NULL ) ;
DisposeRgn( m_clipRgn ) ;
}
private :
m_dc->MacCleanupPort( NULL ) ;
DisposeRgn( m_clipRgn ) ;
}
private :
RgnHandle m_clipRgn ;
GrafPtr m_oldPort ;
const wxDC* m_dc ;
RgnHandle m_clipRgn ;
GrafPtr m_oldPort ;
const wxDC* m_dc ;
tag.version = kMacHelpVersion;
SetRect( &tag.absHotRect , m_position.x - 2 , m_position.y - 2 , m_position.x + 2 , m_position.y + 2 ) ;
GrafPtr port ;
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 );
LocalToGlobal( (Point *) &tag.absHotRect.top );
LocalToGlobal( (Point *) &tag.absHotRect.bottom );
+ if ( swapped )
+ SetPort( port );
m_helpTextRef.Assign( m_label , wxFONTENCODING_DEFAULT ) ;
tag.content[kHMMinimumContentIndex].contentType = kHMCFStringContent ;
tag.content[kHMMinimumContentIndex].u.tagCFString = m_helpTextRef ;
m_helpTextRef.Assign( m_label , wxFONTENCODING_DEFAULT ) ;
tag.content[kHMMinimumContentIndex].contentType = kHMCFStringContent ;
tag.content[kHMMinimumContentIndex].u.tagCFString = m_helpTextRef ;
{
Point tlworigin = { 0 , 0 } ;
GrafPtr port ;
{
Point tlworigin = { 0 , 0 } ;
GrafPtr port ;
- ::GetPort( &port ) ;
- ::SetPort( UMAGetWindowPort( (WindowRef) tlw->MacGetWindowRef() ) ) ;
+ bool swapped = QDSwapPort( UMAGetWindowPort( (WindowRef) tlw->MacGetWindowRef() ) , &port ) ;
::LocalToGlobal( &tlworigin ) ;
::LocalToGlobal( &tlworigin ) ;
+ if ( swapped )
+ ::SetPort( port ) ;
x = tlworigin.h ;
y = tlworigin.v ;
}
x = tlworigin.h ;
y = tlworigin.v ;
}