]> git.saurik.com Git - wxWidgets.git/commitdiff
do nothing in Freeze/Thaw() if the window is hidden, otherwise the window is not...
authorVadim Zeitlin <vadim@wxwidgets.org>
Fri, 25 Mar 2005 23:49:48 +0000 (23:49 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Fri, 25 Mar 2005 23:49:48 +0000 (23:49 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@33060 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/msw/window.cpp

index 0fa200ed2e4e352001a0343a2da562c3a7bbfdab..a2b52faf7a3e58c2a92b571ebfd968a902d46862 100644 (file)
@@ -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,