Module: wine Branch: master Commit: f6d5368da75b12ff499eca2610d4aefd6286d607 URL: http://source.winehq.org/git/wine.git/?a=commit;h=f6d5368da75b12ff499eca2610...
Author: Dmitry Timoshkov dmitry@codeweavers.com Date: Sun Jan 14 20:20:29 2007 +0800
user32: Simplify some maximized MDI child checks.
---
dlls/user32/mdi.c | 26 +++++++++++++------------- 1 files changed, 13 insertions(+), 13 deletions(-)
diff --git a/dlls/user32/mdi.c b/dlls/user32/mdi.c index 8288885..a2def9b 100644 --- a/dlls/user32/mdi.c +++ b/dlls/user32/mdi.c @@ -320,8 +320,8 @@ static LRESULT MDISetMenu( HWND hwnd, HM { if (hmenuFrame == ci->hFrameMenu) return (LRESULT)hmenuFrame;
- if (IsZoomed(ci->hwndActiveChild)) - MDI_RestoreFrameMenu( hwndFrame, ci->hwndActiveChild ); + if (ci->hwndChildMaximized) + MDI_RestoreFrameMenu( hwndFrame, ci->hwndChildMaximized ); }
if( hmenuWindow && hmenuWindow != ci->hWindowMenu ) @@ -355,8 +355,8 @@ static LRESULT MDISetMenu( HWND hwnd, HM HMENU oldFrameMenu = ci->hFrameMenu;
ci->hFrameMenu = hmenuFrame; - if (IsZoomed(ci->hwndActiveChild) && (GetWindowLongW(ci->hwndActiveChild, GWL_STYLE) & WS_VISIBLE)) - MDI_AugmentFrameMenu( hwndFrame, ci->hwndActiveChild ); + if (ci->hwndChildMaximized && (GetWindowLongW(ci->hwndChildMaximized, GWL_STYLE) & WS_VISIBLE)) + MDI_AugmentFrameMenu( hwndFrame, ci->hwndChildMaximized );
return (LRESULT)oldFrameMenu; } @@ -369,8 +369,8 @@ static LRESULT MDISetMenu( HWND hwnd, HM * that the "if" to this "else" wouldn't catch the need to * augment the frame menu. */ - if( IsZoomed(ci->hwndActiveChild) ) - MDI_AugmentFrameMenu( hwndFrame, ci->hwndActiveChild ); + if( ci->hwndChildMaximized ) + MDI_AugmentFrameMenu( hwndFrame, ci->hwndChildMaximized ); }
return 0; @@ -685,8 +685,8 @@ static LONG MDICascade( HWND client, MDI BOOL has_icons = FALSE; int i, total;
- if (IsZoomed(ci->hwndActiveChild)) - SendMessageW(client, WM_MDIRESTORE, (WPARAM)ci->hwndActiveChild, 0); + if (ci->hwndChildMaximized) + SendMessageW(client, WM_MDIRESTORE, (WPARAM)ci->hwndChildMaximized, 0);
if (ci->nActiveChildren == 0) return 0;
@@ -738,8 +738,8 @@ static void MDITile( HWND client, MDICLI int i, total; BOOL has_icons = FALSE;
- if (IsZoomed(ci->hwndActiveChild)) - SendMessageW(client, WM_MDIRESTORE, (WPARAM)ci->hwndActiveChild, 0); + if (ci->hwndChildMaximized) + SendMessageW(client, WM_MDIRESTORE, (WPARAM)ci->hwndChildMaximized, 0);
if (ci->nActiveChildren == 0) return;
@@ -974,7 +974,7 @@ static void MDI_UpdateFrameText( HWND fr
if (ci->frameTitle) { - if (IsZoomed(ci->hwndActiveChild) && IsWindowVisible(ci->hwndActiveChild)) + if (ci->hwndChildMaximized && (GetWindowLongW(ci->hwndChildMaximized, GWL_STYLE) & WS_VISIBLE)) { /* combine frame title and child title if possible */
@@ -1481,7 +1481,7 @@ LRESULT WINAPI DefMDIChildProcW( HWND hw switch( wParam ) { case SC_MOVE: - if( ci->hwndActiveChild == hwnd && IsZoomed(ci->hwndActiveChild)) + if( ci->hwndChildMaximized == hwnd ) return 0; break; case SC_RESTORE: @@ -1502,7 +1502,7 @@ LRESULT WINAPI DefMDIChildProcW( HWND hw
case WM_SHOWWINDOW: case WM_SETVISIBLE: - if (IsZoomed(ci->hwndActiveChild)) ci->mdiFlags &= ~MDIF_NEEDUPDATE; + if (ci->hwndChildMaximized) ci->mdiFlags &= ~MDIF_NEEDUPDATE; else MDI_PostUpdate(client, ci, SB_BOTH+1); break;