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:
@@ -1297,6 +1297,7 @@ void wxWindowMSW::Freeze()
|
||||
{
|
||||
if ( !m_frozenness++ )
|
||||
{
|
||||
if ( IsShown() )
|
||||
SendSetRedraw(GetHwnd(), false);
|
||||
}
|
||||
}
|
||||
@@ -1306,13 +1307,16 @@ void wxWindowMSW::Thaw()
|
||||
wxASSERT_MSG( m_frozenness > 0, _T("Thaw() without matching Freeze()") );
|
||||
|
||||
if ( !--m_frozenness )
|
||||
{
|
||||
if ( IsShown() )
|
||||
{
|
||||
SendSetRedraw(GetHwnd(), true);
|
||||
|
||||
// we need to refresh everything or otherwise he invalidated area is not
|
||||
// repainted
|
||||
// we need to refresh everything or otherwise the invalidated area
|
||||
// is not going to be repainted
|
||||
Refresh();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
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
|
||||
// we are a top level window)
|
||||
wxWindowMSW *parent = GetParent();
|
||||
HDWP hdwp = (parent && !IsTopLevel()) ? (HDWP)parent->m_hDWP : NULL;
|
||||
HDWP hdwp = parent && !IsTopLevel() ? (HDWP)parent->m_hDWP : NULL;
|
||||
if ( hdwp )
|
||||
{
|
||||
hdwp = ::DeferWindowPos(hdwp, GetHwnd(), NULL,
|
||||
|
Reference in New Issue
Block a user