added recursive invalidation after a Thaw command

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@26622 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Stefan Csomor
2004-04-05 05:20:40 +00:00
parent e0c5c96f67
commit b175b96ba0

View File

@@ -1855,6 +1855,27 @@ void wxWindowMac::Freeze()
#endif #endif
} }
#if TARGET_API_MAC_OSX
static void InvalidateControlAndChildren( HIViewRef control )
{
HIViewSetNeedsDisplay( control , true ) ;
UInt16 childrenCount = 0 ;
OSStatus err = CountSubControls( control , &childrenCount ) ;
if ( err == errControlIsNotEmbedder )
return ;
wxASSERT_MSG( err == noErr , wxT("Unexpected error when accessing subcontrols") ) ;
for ( UInt16 i = childrenCount ; i >=1 ; --i )
{
HIViewRef child ;
err = GetIndexedSubControl( control , i , & child ) ;
if ( err == errControlIsNotEmbedder )
return ;
InvalidateControlAndChildren( child ) ;
}
}
#endif
void wxWindowMac::Thaw() void wxWindowMac::Thaw()
{ {
#if TARGET_API_MAC_OSX #if TARGET_API_MAC_OSX
@@ -1863,7 +1884,8 @@ void wxWindowMac::Thaw()
if ( !--m_frozenness ) if ( !--m_frozenness )
{ {
HIViewSetDrawingEnabled( (HIViewRef) m_macControl , true ) ; HIViewSetDrawingEnabled( (HIViewRef) m_macControl , true ) ;
HIViewSetNeedsDisplay( (HIViewRef) m_macControl , true ) ; InvalidateControlAndChildren( (HIViewRef) m_macControl ) ;
// HIViewSetNeedsDisplay( (HIViewRef) m_macControl , true ) ;
} }
#endif #endif
} }