move Freeze() and Thaw() to wxWindowBase to ensure that they behave consistently (i.e. recursively, as described in the docs) in all ports; removed different duplications of freeze count from derived classes
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@51018 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -524,8 +524,6 @@ void wxWindowMSW::Init()
|
||||
m_mouseInWindow = false;
|
||||
m_lastKeydownProcessed = false;
|
||||
|
||||
m_frozenness = 0;
|
||||
|
||||
m_hWnd = 0;
|
||||
m_hDWP = 0;
|
||||
|
||||
@@ -1606,29 +1604,21 @@ static inline void SendSetRedraw(HWND hwnd, bool on)
|
||||
#endif
|
||||
}
|
||||
|
||||
void wxWindowMSW::Freeze()
|
||||
void wxWindowMSW::DoFreeze()
|
||||
{
|
||||
if ( !m_frozenness++ )
|
||||
{
|
||||
if ( IsShown() )
|
||||
SendSetRedraw(GetHwnd(), false);
|
||||
}
|
||||
if ( IsShown() )
|
||||
SendSetRedraw(GetHwnd(), false);
|
||||
}
|
||||
|
||||
void wxWindowMSW::Thaw()
|
||||
void wxWindowMSW::DoThaw()
|
||||
{
|
||||
wxASSERT_MSG( m_frozenness > 0, _T("Thaw() without matching Freeze()") );
|
||||
|
||||
if ( --m_frozenness == 0 )
|
||||
if ( IsShown() )
|
||||
{
|
||||
if ( IsShown() )
|
||||
{
|
||||
SendSetRedraw(GetHwnd(), true);
|
||||
SendSetRedraw(GetHwnd(), true);
|
||||
|
||||
// we need to refresh everything or otherwise the invalidated area
|
||||
// is not going to be repainted
|
||||
Refresh();
|
||||
}
|
||||
// we need to refresh everything or otherwise the invalidated area
|
||||
// is not going to be repainted
|
||||
Refresh();
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user