When freezing a top-level window freeze its top children instead.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@49475 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -1516,7 +1516,29 @@ void wxWindowMSW::Freeze()
|
|||||||
if ( !m_frozenness++ )
|
if ( !m_frozenness++ )
|
||||||
{
|
{
|
||||||
if ( IsShown() )
|
if ( IsShown() )
|
||||||
SendSetRedraw(GetHwnd(), false);
|
{
|
||||||
|
if ( IsTopLevel() )
|
||||||
|
{
|
||||||
|
// If this is a TLW, then freeze it's non-TLW children
|
||||||
|
// instead. This is needed because on Windows a frozen TLW
|
||||||
|
// lets window paint and mouse events pass through to other
|
||||||
|
// Windows below this one in z-order.
|
||||||
|
for ( wxWindowList::compatibility_iterator node = GetChildren().GetFirst();
|
||||||
|
node;
|
||||||
|
node = node->GetNext() )
|
||||||
|
{
|
||||||
|
wxWindow *child = node->GetData();
|
||||||
|
if ( child->IsTopLevel() )
|
||||||
|
continue;
|
||||||
|
else
|
||||||
|
child->Freeze();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else // This is not a TLW, so just freeze it.
|
||||||
|
{
|
||||||
|
SendSetRedraw(GetHwnd(), false);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1528,7 +1550,25 @@ void wxWindowMSW::Thaw()
|
|||||||
{
|
{
|
||||||
if ( IsShown() )
|
if ( IsShown() )
|
||||||
{
|
{
|
||||||
SendSetRedraw(GetHwnd(), true);
|
if ( IsTopLevel() )
|
||||||
|
{
|
||||||
|
// If this is a TLW, then Thaw it's non-TLW children
|
||||||
|
// instead. See Freeze.
|
||||||
|
for ( wxWindowList::compatibility_iterator node = GetChildren().GetFirst();
|
||||||
|
node;
|
||||||
|
node = node->GetNext() )
|
||||||
|
{
|
||||||
|
wxWindow *child = node->GetData();
|
||||||
|
if ( child->IsTopLevel() )
|
||||||
|
continue;
|
||||||
|
else
|
||||||
|
child->Thaw();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else // This is not a TLW, so just thaw it.
|
||||||
|
{
|
||||||
|
SendSetRedraw(GetHwnd(), true);
|
||||||
|
}
|
||||||
|
|
||||||
// we need to refresh everything or otherwise the invalidated area
|
// we need to refresh everything or otherwise the invalidated area
|
||||||
// is not going to be repainted
|
// is not going to be repainted
|
||||||
|
Reference in New Issue
Block a user