Dmitry Timoshkov : user32: Restore old WM_SIZE handler in mdi child.

Alexandre Julliard julliard at wine.codeweavers.com
Mon Jan 8 06:35:47 CST 2007


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

Author: Dmitry Timoshkov <dmitry at codeweavers.com>
Date:   Mon Jan  8 18:31:56 2007 +0800

user32: Restore old WM_SIZE handler in mdi child.

---

 dlls/user32/mdi.c |   26 +++++++++++++++++---------
 1 files changed, 17 insertions(+), 9 deletions(-)

diff --git a/dlls/user32/mdi.c b/dlls/user32/mdi.c
index 8f25386..4f6844c 100644
--- a/dlls/user32/mdi.c
+++ b/dlls/user32/mdi.c
@@ -1513,20 +1513,18 @@ LRESULT WINAPI DefMDIChildProcW( HWND hw
         break;
 
     case WM_SIZE:
+        /* do not change */
         TRACE("current active %p, maximized %p\n", ci->hwndActiveChild, ci->hwndChildMaximized);
 
-        if( ci->hwndChildMaximized == hwnd && wParam != SIZE_MAXIMIZED )
+        if( ci->hwndActiveChild == hwnd && wParam != SIZE_MAXIMIZED )
         {
             HWND frame;
 
+            ci->hwndChildMaximized = 0;
+
             frame = GetParent(client);
             MDI_RestoreFrameMenu( frame, hwnd );
             MDI_UpdateFrameText( frame, client, FALSE, NULL );
-
-            ci->hwndChildMaximized = 0;
-
-            MDI_RefreshMenu(ci);
-            MDI_PostUpdate(client, ci, SB_BOTH+1);
         }
 
         if( wParam == SIZE_MAXIMIZED )
@@ -1534,11 +1532,14 @@ LRESULT WINAPI DefMDIChildProcW( HWND hw
             HWND frame, hMaxChild = ci->hwndChildMaximized;
 
             if( hMaxChild == hwnd ) break;
+
             if( hMaxChild)
             {
                 SendMessageW( hMaxChild, WM_SETREDRAW, FALSE, 0 );
+
                 MDI_RestoreFrameMenu( GetParent(client), hMaxChild );
                 ShowWindow( hMaxChild, SW_SHOWNOACTIVATE );
+
                 SendMessageW( hMaxChild, WM_SETREDRAW, TRUE, 0 );
             }
 
@@ -1550,10 +1551,17 @@ LRESULT WINAPI DefMDIChildProcW( HWND hw
             frame = GetParent(client);
             MDI_AugmentFrameMenu( frame, hwnd );
             MDI_UpdateFrameText( frame, client, TRUE, NULL );
-
-            MDI_RefreshMenu(ci);
-            MDI_PostUpdate(client, ci, SB_BOTH+1);
         }
+
+        if( wParam == SIZE_MINIMIZED )
+        {
+            HWND switchTo = MDI_GetWindow( ci, hwnd, TRUE, WS_MINIMIZE );
+
+            if( switchTo )
+                SendMessageW( switchTo, WM_CHILDACTIVATE, 0, 0 );
+	}
+
+        MDI_PostUpdate(client, ci, SB_BOTH+1);
         break;
 
     case WM_NEXTMENU:




More information about the wine-cvs mailing list