do nothing in Freeze/Thaw() if the window is hidden, otherwise the window is not redrawn correctly after being eventually shown

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@33060 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2005-03-25 23:49:48 +00:00
parent 4a64a89c2f
commit dc993cbfc6

View File

@@ -1297,6 +1297,7 @@ void wxWindowMSW::Freeze()
{ {
if ( !m_frozenness++ ) if ( !m_frozenness++ )
{ {
if ( IsShown() )
SendSetRedraw(GetHwnd(), false); SendSetRedraw(GetHwnd(), false);
} }
} }
@@ -1306,13 +1307,16 @@ void wxWindowMSW::Thaw()
wxASSERT_MSG( m_frozenness > 0, _T("Thaw() without matching Freeze()") ); wxASSERT_MSG( m_frozenness > 0, _T("Thaw() without matching Freeze()") );
if ( !--m_frozenness ) if ( !--m_frozenness )
{
if ( IsShown() )
{ {
SendSetRedraw(GetHwnd(), true); SendSetRedraw(GetHwnd(), true);
// we need to refresh everything or otherwise he invalidated area is not // we need to refresh everything or otherwise the invalidated area
// repainted // is not going to be repainted
Refresh(); Refresh();
} }
}
} }
void wxWindowMSW::Refresh(bool eraseBack, const wxRect *rect) void wxWindowMSW::Refresh(bool eraseBack, const wxRect *rect)
@@ -1507,7 +1511,7 @@ void wxWindowMSW::DoMoveWindow(int x, int y, int width, int height)
// if our parent had prepared a defer window handle for us, use it (unless // if our parent had prepared a defer window handle for us, use it (unless
// we are a top level window) // we are a top level window)
wxWindowMSW *parent = GetParent(); wxWindowMSW *parent = GetParent();
HDWP hdwp = (parent && !IsTopLevel()) ? (HDWP)parent->m_hDWP : NULL; HDWP hdwp = parent && !IsTopLevel() ? (HDWP)parent->m_hDWP : NULL;
if ( hdwp ) if ( hdwp )
{ {
hdwp = ::DeferWindowPos(hdwp, GetHwnd(), NULL, hdwp = ::DeferWindowPos(hdwp, GetHwnd(), NULL,