fixed TLWs resizing to invalidate the DFB surface used for painting
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@41297 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
f97d937077
commit
7807a2b499
@ -214,7 +214,11 @@ void wxTopLevelWindowDFB::DoMoveWindow(int x, int y, int width, int height)
|
|||||||
wxSize cursize = GetSize();
|
wxSize cursize = GetSize();
|
||||||
if ( cursize.x != width || cursize.y != height )
|
if ( cursize.x != width || cursize.y != height )
|
||||||
{
|
{
|
||||||
|
// changing window's size changes its surface:
|
||||||
|
InvalidateDfbSurface();
|
||||||
|
|
||||||
m_dfbwin->Resize(width, height);
|
m_dfbwin->Resize(width, height);
|
||||||
|
|
||||||
// we must repaint the window after it changed size:
|
// we must repaint the window after it changed size:
|
||||||
if ( IsShown() )
|
if ( IsShown() )
|
||||||
DoRefreshWindow();
|
DoRefreshWindow();
|
||||||
|
@ -173,6 +173,14 @@ wxIDirectFBSurfacePtr wxWindowDFB::GetDfbSurface()
|
|||||||
void wxWindowDFB::InvalidateDfbSurface()
|
void wxWindowDFB::InvalidateDfbSurface()
|
||||||
{
|
{
|
||||||
m_surface = NULL;
|
m_surface = NULL;
|
||||||
|
|
||||||
|
// surfaces of the children are subsurfaces of this window's surface,
|
||||||
|
// so they must be invalidated as well:
|
||||||
|
wxWindowList& children = GetChildren();
|
||||||
|
for ( wxWindowList::iterator i = children.begin(); i != children.end(); ++i )
|
||||||
|
{
|
||||||
|
(*i)->InvalidateDfbSurface();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// ---------------------------------------------------------------------------
|
// ---------------------------------------------------------------------------
|
||||||
|
Loading…
Reference in New Issue
Block a user