reverted some redrawing optimizations due to redraw errors

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@10430 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Stefan Csomor 2001-06-05 20:33:00 +00:00
parent 7f017c64bb
commit fd2e20ff9c
4 changed files with 54 additions and 22 deletions

View File

@ -360,7 +360,15 @@ void wxControl::MacSuperChangedPosition()
if ( mac_x != former_mac_x || mac_y != former_mac_y )
{
{
Rect inval = { former_mac_y , former_mac_x , former_mac_y + m_height , former_mac_x + m_width } ;
InvalWindowRect( rootwindow , &inval ) ;
}
UMAMoveControl( m_macControl , mac_x + m_macHorizontalBorder , mac_y + m_macVerticalBorder ) ;
{
Rect inval = { mac_y , mac_x , mac_y + m_height , mac_x + m_width } ;
InvalWindowRect( rootwindow , &inval ) ;
}
}
if ( wxrootwindow->IsKindOf( CLASSINFO( wxDialog ) ) )
{
@ -488,7 +496,15 @@ void wxControl::DoSetSize(int x, int y,
if ( mac_x != former_mac_x || mac_y != former_mac_y )
{
{
Rect inval = { former_mac_y , former_mac_x , former_mac_y + m_height , former_mac_x + m_width } ;
InvalWindowRect( macrootwindow, &inval ) ;
}
UMAMoveControl( m_macControl , mac_x + m_macHorizontalBorder , mac_y + m_macVerticalBorder ) ;
{
Rect inval = { mac_y , mac_x , mac_y + m_height , mac_x + m_width } ;
InvalWindowRect(macrootwindow, &inval ) ;
}
}
if ( actualX != former_x || actualY != former_y )
@ -498,9 +514,9 @@ void wxControl::DoSetSize(int x, int y,
MacRepositionScrollBars() ;
// To consider -> should the parameters be the effective or the virtual coordinates (AdjustForParent..)
wxMoveEvent event(wxPoint(m_x, m_y), m_windowId);
event.SetEventObject(this);
GetEventHandler()->ProcessEvent(event);
wxMoveEvent event(wxPoint(m_x, m_y), m_windowId);
event.SetEventObject(this);
GetEventHandler()->ProcessEvent(event);
}
if ( actualWidth != former_w || actualHeight != former_h )
{
@ -518,9 +534,9 @@ void wxControl::DoSetSize(int x, int y,
}
MacRepositionScrollBars() ;
wxSizeEvent event(wxSize(m_width, m_height), m_windowId);
event.SetEventObject(this);
GetEventHandler()->ProcessEvent(event);
wxSizeEvent event(wxSize(m_width, m_height), m_windowId);
event.SetEventObject(this);
GetEventHandler()->ProcessEvent(event);
}
if ( wxrootwindow->IsKindOf( CLASSINFO( wxDialog ) ) )
{

View File

@ -643,7 +643,7 @@ void wxWindow::DoSetSize(int x, int y, int width, int height, int sizeFlags)
if ( focus.Ok() )
{
Rect clientrect = { 0 , 0 , m_height , m_width } ;
// ClipRect( &clientrect ) ;
ClipRect( &clientrect ) ;
InvalWindowRect( GetMacRootWindow() , &clientrect ) ;
}
}
@ -678,7 +678,7 @@ void wxWindow::DoSetSize(int x, int y, int width, int height, int sizeFlags)
if ( focus.Ok() )
{
Rect clientrect = { 0 , 0 , m_height , m_width } ;
// ClipRect( &clientrect ) ;
ClipRect( &clientrect ) ;
InvalWindowRect( GetMacRootWindow() , &clientrect ) ;
}
}
@ -916,7 +916,7 @@ void wxWindow::Refresh(bool eraseBack, const wxRect *rect)
if ( focus.Ok() )
{
Rect clientrect = { 0 , 0 , m_height , m_width } ;
// ClipRect( &clientrect ) ;
ClipRect( &clientrect ) ;
if ( rect )
{
@ -1872,7 +1872,7 @@ void wxWindow::MacRedraw( RgnHandle updatergn , long time)
RGBBackColor( &m_backgroundColour.GetPixel()) ;
}
// subtract all non transparent children from updatergn
RgnHandle childarea = NewRgn() ;
for (wxNode *node = GetChildren().First(); node; node = node->Next())
{
@ -1880,7 +1880,7 @@ void wxWindow::MacRedraw( RgnHandle updatergn , long time)
// eventually test for transparent windows
if ( child->GetMacRootWindow() == window && child->IsShown() )
{
if ( !child->IsKindOf( CLASSINFO( wxControl ) ) && ((wxControl*)child)->GetMacControl() )
if ( child->GetBackgroundColour() != m_backgroundColour && !child->IsKindOf( CLASSINFO( wxControl ) ) && ((wxControl*)child)->GetMacControl() )
{
SetRectRgn( childarea , child->m_x , child->m_y , child->m_x + child->m_width , child->m_y + child->m_height ) ;
DiffRgn( ownUpdateRgn , childarea , ownUpdateRgn ) ;

View File

@ -360,7 +360,15 @@ void wxControl::MacSuperChangedPosition()
if ( mac_x != former_mac_x || mac_y != former_mac_y )
{
{
Rect inval = { former_mac_y , former_mac_x , former_mac_y + m_height , former_mac_x + m_width } ;
InvalWindowRect( rootwindow , &inval ) ;
}
UMAMoveControl( m_macControl , mac_x + m_macHorizontalBorder , mac_y + m_macVerticalBorder ) ;
{
Rect inval = { mac_y , mac_x , mac_y + m_height , mac_x + m_width } ;
InvalWindowRect( rootwindow , &inval ) ;
}
}
if ( wxrootwindow->IsKindOf( CLASSINFO( wxDialog ) ) )
{
@ -488,7 +496,15 @@ void wxControl::DoSetSize(int x, int y,
if ( mac_x != former_mac_x || mac_y != former_mac_y )
{
{
Rect inval = { former_mac_y , former_mac_x , former_mac_y + m_height , former_mac_x + m_width } ;
InvalWindowRect( macrootwindow, &inval ) ;
}
UMAMoveControl( m_macControl , mac_x + m_macHorizontalBorder , mac_y + m_macVerticalBorder ) ;
{
Rect inval = { mac_y , mac_x , mac_y + m_height , mac_x + m_width } ;
InvalWindowRect(macrootwindow, &inval ) ;
}
}
if ( actualX != former_x || actualY != former_y )
@ -498,9 +514,9 @@ void wxControl::DoSetSize(int x, int y,
MacRepositionScrollBars() ;
// To consider -> should the parameters be the effective or the virtual coordinates (AdjustForParent..)
wxMoveEvent event(wxPoint(m_x, m_y), m_windowId);
event.SetEventObject(this);
GetEventHandler()->ProcessEvent(event);
wxMoveEvent event(wxPoint(m_x, m_y), m_windowId);
event.SetEventObject(this);
GetEventHandler()->ProcessEvent(event);
}
if ( actualWidth != former_w || actualHeight != former_h )
{
@ -518,9 +534,9 @@ void wxControl::DoSetSize(int x, int y,
}
MacRepositionScrollBars() ;
wxSizeEvent event(wxSize(m_width, m_height), m_windowId);
event.SetEventObject(this);
GetEventHandler()->ProcessEvent(event);
wxSizeEvent event(wxSize(m_width, m_height), m_windowId);
event.SetEventObject(this);
GetEventHandler()->ProcessEvent(event);
}
if ( wxrootwindow->IsKindOf( CLASSINFO( wxDialog ) ) )
{

View File

@ -643,7 +643,7 @@ void wxWindow::DoSetSize(int x, int y, int width, int height, int sizeFlags)
if ( focus.Ok() )
{
Rect clientrect = { 0 , 0 , m_height , m_width } ;
// ClipRect( &clientrect ) ;
ClipRect( &clientrect ) ;
InvalWindowRect( GetMacRootWindow() , &clientrect ) ;
}
}
@ -678,7 +678,7 @@ void wxWindow::DoSetSize(int x, int y, int width, int height, int sizeFlags)
if ( focus.Ok() )
{
Rect clientrect = { 0 , 0 , m_height , m_width } ;
// ClipRect( &clientrect ) ;
ClipRect( &clientrect ) ;
InvalWindowRect( GetMacRootWindow() , &clientrect ) ;
}
}
@ -916,7 +916,7 @@ void wxWindow::Refresh(bool eraseBack, const wxRect *rect)
if ( focus.Ok() )
{
Rect clientrect = { 0 , 0 , m_height , m_width } ;
// ClipRect( &clientrect ) ;
ClipRect( &clientrect ) ;
if ( rect )
{
@ -1872,7 +1872,7 @@ void wxWindow::MacRedraw( RgnHandle updatergn , long time)
RGBBackColor( &m_backgroundColour.GetPixel()) ;
}
// subtract all non transparent children from updatergn
RgnHandle childarea = NewRgn() ;
for (wxNode *node = GetChildren().First(); node; node = node->Next())
{
@ -1880,7 +1880,7 @@ void wxWindow::MacRedraw( RgnHandle updatergn , long time)
// eventually test for transparent windows
if ( child->GetMacRootWindow() == window && child->IsShown() )
{
if ( !child->IsKindOf( CLASSINFO( wxControl ) ) && ((wxControl*)child)->GetMacControl() )
if ( child->GetBackgroundColour() != m_backgroundColour && !child->IsKindOf( CLASSINFO( wxControl ) ) && ((wxControl*)child)->GetMacControl() )
{
SetRectRgn( childarea , child->m_x , child->m_y , child->m_x + child->m_width , child->m_y + child->m_height ) ;
DiffRgn( ownUpdateRgn , childarea , ownUpdateRgn ) ;