fixing memleak, correcting huge background erase area
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@28626 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -1984,6 +1984,7 @@ void wxWindowMac::Refresh(bool eraseBack, const wxRect *rect)
|
|||||||
// inset
|
// inset
|
||||||
OffsetRgn( update , -MacGetLeftBorderSize() , -MacGetTopBorderSize() ) ;
|
OffsetRgn( update , -MacGetLeftBorderSize() , -MacGetTopBorderSize() ) ;
|
||||||
m_peer->SetNeedsDisplay( true , update) ;
|
m_peer->SetNeedsDisplay( true , update) ;
|
||||||
|
DisposeRgn( update ) ;
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
/*
|
/*
|
||||||
@@ -2696,11 +2697,10 @@ bool wxWindowMac::MacDoRedraw( WXHRGN updatergnr , long time )
|
|||||||
SetRectRgn( newupdate , origin.x , origin.y , origin.x + point.x , origin.y+point.y ) ;
|
SetRectRgn( newupdate , origin.x , origin.y , origin.x + point.x , origin.y+point.y ) ;
|
||||||
SectRgn( newupdate , updatergn , newupdate ) ;
|
SectRgn( newupdate , updatergn , newupdate ) ;
|
||||||
|
|
||||||
|
if (!EmptyRgn(newupdate))
|
||||||
{
|
{
|
||||||
wxWindowDC dc(this);
|
wxWindowDC dc(this);
|
||||||
if (!EmptyRgn(newupdate))
|
|
||||||
dc.SetClippingRegion(wxRegion(newupdate));
|
dc.SetClippingRegion(wxRegion(newupdate));
|
||||||
|
|
||||||
wxEraseEvent eevent( GetId(), &dc );
|
wxEraseEvent eevent( GetId(), &dc );
|
||||||
eevent.SetEventObject( this );
|
eevent.SetEventObject( this );
|
||||||
GetEventHandler()->ProcessEvent( eevent );
|
GetEventHandler()->ProcessEvent( eevent );
|
||||||
|
Reference in New Issue
Block a user