added calls for invalidating the dc setup on mac explicitely (needed in case of nested updates (e.g. writing a message to a text control while being in paint mode)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@9438 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
a22be3e1fc
commit
b89dac7816
@ -2619,6 +2619,7 @@ AGAPortHelper::~AGAPortHelper()
|
||||
TextMode( mode );
|
||||
SetOrigin( 0 , 0 ) ;
|
||||
SetPort( port ) ;
|
||||
wxDC::MacInvalidateSetup() ;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2619,6 +2619,7 @@ AGAPortHelper::~AGAPortHelper()
|
||||
TextMode( mode );
|
||||
SetOrigin( 0 , 0 ) ;
|
||||
SetPort( port ) ;
|
||||
wxDC::MacInvalidateSetup() ;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -623,6 +623,7 @@ void wxControl::MacRedrawControl()
|
||||
|
||||
UMADrawControl( m_macControl ) ;
|
||||
UMASetThemeWindowBackground( win->MacGetWindowData()->m_macWindow , win->MacGetWindowData()->m_macWindowBackgroundTheme , false ) ;
|
||||
wxDC::MacInvalidateSetup() ;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -664,6 +665,7 @@ void wxControl::OnPaint(wxPaintEvent& event)
|
||||
|
||||
UMADrawControl( m_macControl ) ;
|
||||
UMASetThemeWindowBackground( win->MacGetWindowData()->m_macWindow , win->MacGetWindowData()->m_macWindowBackgroundTheme , false ) ;
|
||||
wxDC::MacInvalidateSetup() ;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -536,6 +536,7 @@ void wxToolBar::OnPaint(wxPaintEvent& event)
|
||||
}
|
||||
}
|
||||
UMASetThemeWindowBackground( win->MacGetWindowData()->m_macWindow , win->MacGetWindowData()->m_macWindowBackgroundTheme , false ) ;
|
||||
wxDC::MacInvalidateSetup() ;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -295,6 +295,7 @@ void wxMacToolTip::Draw()
|
||||
|
||||
::DrawText( text , laststop , i - laststop ) ;
|
||||
::TextMode( srcOr ) ;
|
||||
wxDC::MacInvalidateSetup() ;
|
||||
|
||||
// DrawText( m_label , 0 , m_label.Length() ) ;
|
||||
}
|
||||
@ -329,6 +330,7 @@ void wxMacToolTip::Clear()
|
||||
DrawPicture(m_backpict, &m_rect);
|
||||
KillPicture(m_backpict);
|
||||
m_backpict = NULL ;
|
||||
wxDC::MacInvalidateSetup() ;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -834,6 +834,7 @@ OSErr UMASetKeyboardFocus (WindowPtr inWindow,
|
||||
}
|
||||
#endif
|
||||
SetPort( port ) ;
|
||||
wxDC::MacInvalidateSetup() ;
|
||||
return err ;
|
||||
}
|
||||
|
||||
|
@ -2271,37 +2271,8 @@ long wxWindow::MacRemoveBordersFromStyle( long style )
|
||||
{
|
||||
return style & ~( wxDOUBLE_BORDER | wxSUNKEN_BORDER | wxRAISED_BORDER | wxBORDER | wxSTATIC_BORDER ) ;
|
||||
}
|
||||
/*
|
||||
wxMacFocusHelper::wxMacFocusHelper( wxWindow * theWindow )
|
||||
{
|
||||
m_ok = false ;
|
||||
Point localOrigin ;
|
||||
Rect clipRect ;
|
||||
WindowRef window ;
|
||||
wxWindow *rootwin ;
|
||||
m_currentPort = NULL ;
|
||||
GetPort( &m_formerPort ) ;
|
||||
if ( theWindow )
|
||||
{
|
||||
|
||||
theWindow->MacGetPortParams( &localOrigin , &clipRect , &window , &rootwin) ;
|
||||
m_currentPort = UMAGetWindowPort( window ) ;
|
||||
theWindow->MacSetPortFocusParams( localOrigin, clipRect, window , rootwin ) ;
|
||||
m_ok = true ;
|
||||
}
|
||||
}
|
||||
|
||||
wxMacFocusHelper::~wxMacFocusHelper()
|
||||
{
|
||||
if ( m_ok )
|
||||
{
|
||||
SetPort( m_currentPort ) ;
|
||||
SetOrigin( 0 , 0 ) ;
|
||||
}
|
||||
if ( m_formerPort != m_currentPort )
|
||||
SetPort( m_formerPort ) ;
|
||||
}
|
||||
*/
|
||||
|
||||
|
||||
wxMacDrawingHelper::wxMacDrawingHelper( wxWindow * theWindow )
|
||||
{
|
||||
m_ok = false ;
|
||||
@ -2334,43 +2305,12 @@ wxMacDrawingHelper::~wxMacDrawingHelper()
|
||||
Rect portRect ;
|
||||
GetPortBounds( m_currentPort , &portRect ) ;
|
||||
ClipRect( &portRect ) ;
|
||||
wxDC::MacInvalidateSetup() ;
|
||||
}
|
||||
|
||||
if ( m_formerPort != m_currentPort )
|
||||
SetPort( m_formerPort ) ;
|
||||
}
|
||||
/*
|
||||
wxMacFocusClientHelper::wxMacFocusClientHelper( wxWindow * theWindow )
|
||||
{
|
||||
m_ok = false ;
|
||||
Point localOrigin ;
|
||||
Rect clipRect ;
|
||||
WindowRef window ;
|
||||
wxWindow *rootwin ;
|
||||
m_currentPort = NULL ;
|
||||
|
||||
GetPort( &m_formerPort ) ;
|
||||
|
||||
if ( theWindow )
|
||||
{
|
||||
theWindow->MacGetPortClientParams( &localOrigin , &clipRect , &window , &rootwin) ;
|
||||
m_currentPort = UMAGetWindowPort( window ) ;
|
||||
theWindow->MacSetPortFocusParams( localOrigin, clipRect, window , rootwin ) ;
|
||||
m_ok = true ;
|
||||
}
|
||||
}
|
||||
|
||||
wxMacFocusClientHelper::~wxMacFocusClientHelper()
|
||||
{
|
||||
if ( m_ok )
|
||||
{
|
||||
SetPort( m_currentPort ) ;
|
||||
SetOrigin( 0 , 0 ) ;
|
||||
}
|
||||
if ( m_formerPort != m_currentPort )
|
||||
SetPort( m_formerPort ) ;
|
||||
}
|
||||
*/
|
||||
|
||||
wxMacDrawingClientHelper::wxMacDrawingClientHelper( wxWindow * theWindow )
|
||||
{
|
||||
|
@ -623,6 +623,7 @@ void wxControl::MacRedrawControl()
|
||||
|
||||
UMADrawControl( m_macControl ) ;
|
||||
UMASetThemeWindowBackground( win->MacGetWindowData()->m_macWindow , win->MacGetWindowData()->m_macWindowBackgroundTheme , false ) ;
|
||||
wxDC::MacInvalidateSetup() ;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -664,6 +665,7 @@ void wxControl::OnPaint(wxPaintEvent& event)
|
||||
|
||||
UMADrawControl( m_macControl ) ;
|
||||
UMASetThemeWindowBackground( win->MacGetWindowData()->m_macWindow , win->MacGetWindowData()->m_macWindowBackgroundTheme , false ) ;
|
||||
wxDC::MacInvalidateSetup() ;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -536,6 +536,7 @@ void wxToolBar::OnPaint(wxPaintEvent& event)
|
||||
}
|
||||
}
|
||||
UMASetThemeWindowBackground( win->MacGetWindowData()->m_macWindow , win->MacGetWindowData()->m_macWindowBackgroundTheme , false ) ;
|
||||
wxDC::MacInvalidateSetup() ;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -295,6 +295,7 @@ void wxMacToolTip::Draw()
|
||||
|
||||
::DrawText( text , laststop , i - laststop ) ;
|
||||
::TextMode( srcOr ) ;
|
||||
wxDC::MacInvalidateSetup() ;
|
||||
|
||||
// DrawText( m_label , 0 , m_label.Length() ) ;
|
||||
}
|
||||
@ -329,6 +330,7 @@ void wxMacToolTip::Clear()
|
||||
DrawPicture(m_backpict, &m_rect);
|
||||
KillPicture(m_backpict);
|
||||
m_backpict = NULL ;
|
||||
wxDC::MacInvalidateSetup() ;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -834,6 +834,7 @@ OSErr UMASetKeyboardFocus (WindowPtr inWindow,
|
||||
}
|
||||
#endif
|
||||
SetPort( port ) ;
|
||||
wxDC::MacInvalidateSetup() ;
|
||||
return err ;
|
||||
}
|
||||
|
||||
|
@ -2271,37 +2271,8 @@ long wxWindow::MacRemoveBordersFromStyle( long style )
|
||||
{
|
||||
return style & ~( wxDOUBLE_BORDER | wxSUNKEN_BORDER | wxRAISED_BORDER | wxBORDER | wxSTATIC_BORDER ) ;
|
||||
}
|
||||
/*
|
||||
wxMacFocusHelper::wxMacFocusHelper( wxWindow * theWindow )
|
||||
{
|
||||
m_ok = false ;
|
||||
Point localOrigin ;
|
||||
Rect clipRect ;
|
||||
WindowRef window ;
|
||||
wxWindow *rootwin ;
|
||||
m_currentPort = NULL ;
|
||||
GetPort( &m_formerPort ) ;
|
||||
if ( theWindow )
|
||||
{
|
||||
|
||||
theWindow->MacGetPortParams( &localOrigin , &clipRect , &window , &rootwin) ;
|
||||
m_currentPort = UMAGetWindowPort( window ) ;
|
||||
theWindow->MacSetPortFocusParams( localOrigin, clipRect, window , rootwin ) ;
|
||||
m_ok = true ;
|
||||
}
|
||||
}
|
||||
|
||||
wxMacFocusHelper::~wxMacFocusHelper()
|
||||
{
|
||||
if ( m_ok )
|
||||
{
|
||||
SetPort( m_currentPort ) ;
|
||||
SetOrigin( 0 , 0 ) ;
|
||||
}
|
||||
if ( m_formerPort != m_currentPort )
|
||||
SetPort( m_formerPort ) ;
|
||||
}
|
||||
*/
|
||||
|
||||
|
||||
wxMacDrawingHelper::wxMacDrawingHelper( wxWindow * theWindow )
|
||||
{
|
||||
m_ok = false ;
|
||||
@ -2334,43 +2305,12 @@ wxMacDrawingHelper::~wxMacDrawingHelper()
|
||||
Rect portRect ;
|
||||
GetPortBounds( m_currentPort , &portRect ) ;
|
||||
ClipRect( &portRect ) ;
|
||||
wxDC::MacInvalidateSetup() ;
|
||||
}
|
||||
|
||||
if ( m_formerPort != m_currentPort )
|
||||
SetPort( m_formerPort ) ;
|
||||
}
|
||||
/*
|
||||
wxMacFocusClientHelper::wxMacFocusClientHelper( wxWindow * theWindow )
|
||||
{
|
||||
m_ok = false ;
|
||||
Point localOrigin ;
|
||||
Rect clipRect ;
|
||||
WindowRef window ;
|
||||
wxWindow *rootwin ;
|
||||
m_currentPort = NULL ;
|
||||
|
||||
GetPort( &m_formerPort ) ;
|
||||
|
||||
if ( theWindow )
|
||||
{
|
||||
theWindow->MacGetPortClientParams( &localOrigin , &clipRect , &window , &rootwin) ;
|
||||
m_currentPort = UMAGetWindowPort( window ) ;
|
||||
theWindow->MacSetPortFocusParams( localOrigin, clipRect, window , rootwin ) ;
|
||||
m_ok = true ;
|
||||
}
|
||||
}
|
||||
|
||||
wxMacFocusClientHelper::~wxMacFocusClientHelper()
|
||||
{
|
||||
if ( m_ok )
|
||||
{
|
||||
SetPort( m_currentPort ) ;
|
||||
SetOrigin( 0 , 0 ) ;
|
||||
}
|
||||
if ( m_formerPort != m_currentPort )
|
||||
SetPort( m_formerPort ) ;
|
||||
}
|
||||
*/
|
||||
|
||||
wxMacDrawingClientHelper::wxMacDrawingClientHelper( wxWindow * theWindow )
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user