Alexandre Julliard : user32: Only skip redraws on MDI child unmaximize if the new child is maximized.

Alexandre Julliard julliard at winehq.org
Fri May 28 09:43:13 CDT 2010


Module: wine
Branch: master
Commit: d815e582cf327dca33cf84c3cc27701c2eef98ba
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=d815e582cf327dca33cf84c3cc27701c2eef98ba

Author: Alexandre Julliard <julliard at winehq.org>
Date:   Fri May 28 15:01:25 2010 +0200

user32: Only skip redraws on MDI child unmaximize if the new child is maximized.

---

 dlls/user32/win.c |   11 ++++++++---
 1 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/dlls/user32/win.c b/dlls/user32/win.c
index 74ea0b3..6800abd 100644
--- a/dlls/user32/win.c
+++ b/dlls/user32/win.c
@@ -1148,9 +1148,14 @@ HWND WIN_CreateWindowEx( CREATESTRUCTW *cs, LPCWSTR className, HINSTANCE module,
             if((cs->style & WS_VISIBLE) && IsZoomed(top_child))
             {
                 TRACE("Restoring current maximized child %p\n", top_child);
-                SendMessageW( top_child, WM_SETREDRAW, FALSE, 0 );
-                ShowWindow( top_child, SW_SHOWNORMAL );
-                SendMessageW( top_child, WM_SETREDRAW, TRUE, 0 );
+                if (cs->style & WS_MAXIMIZE)
+                {
+                    /* if the new window is maximized don't bother repainting */
+                    SendMessageW( top_child, WM_SETREDRAW, FALSE, 0 );
+                    ShowWindow( top_child, SW_SHOWNORMAL );
+                    SendMessageW( top_child, WM_SETREDRAW, TRUE, 0 );
+                }
+                else ShowWindow( top_child, SW_SHOWNORMAL );
             }
         }
     }




More information about the wine-cvs mailing list