X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/d53e5a41d3e9f8ea655a7e227ab9225ff8fa2678..f36a04a7b6cacf2eb884c8cad981baee9eed0f88:/src/msw/window.cpp?ds=sidebyside diff --git a/src/msw/window.cpp b/src/msw/window.cpp index 0fa200ed2e..a2b52faf7a 100644 --- a/src/msw/window.cpp +++ b/src/msw/window.cpp @@ -1297,7 +1297,8 @@ void wxWindowMSW::Freeze() { if ( !m_frozenness++ ) { - SendSetRedraw(GetHwnd(), false); + if ( IsShown() ) + SendSetRedraw(GetHwnd(), false); } } @@ -1307,11 +1308,14 @@ void wxWindowMSW::Thaw() if ( !--m_frozenness ) { - SendSetRedraw(GetHwnd(), true); + if ( IsShown() ) + { + SendSetRedraw(GetHwnd(), true); - // we need to refresh everything or otherwise he invalidated area is not - // repainted - Refresh(); + // we need to refresh everything or otherwise the invalidated area + // is not going to be repainted + Refresh(); + } } } @@ -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,