Commit f6d5368d authored by Dmitry Timoshkov's avatar Dmitry Timoshkov Committed by Alexandre Julliard

user32: Simplify some maximized MDI child checks.

parent d63fd791
...@@ -320,8 +320,8 @@ static LRESULT MDISetMenu( HWND hwnd, HMENU hmenuFrame, ...@@ -320,8 +320,8 @@ static LRESULT MDISetMenu( HWND hwnd, HMENU hmenuFrame,
{ {
if (hmenuFrame == ci->hFrameMenu) return (LRESULT)hmenuFrame; if (hmenuFrame == ci->hFrameMenu) return (LRESULT)hmenuFrame;
if (IsZoomed(ci->hwndActiveChild)) if (ci->hwndChildMaximized)
MDI_RestoreFrameMenu( hwndFrame, ci->hwndActiveChild ); MDI_RestoreFrameMenu( hwndFrame, ci->hwndChildMaximized );
} }
if( hmenuWindow && hmenuWindow != ci->hWindowMenu ) if( hmenuWindow && hmenuWindow != ci->hWindowMenu )
...@@ -355,8 +355,8 @@ static LRESULT MDISetMenu( HWND hwnd, HMENU hmenuFrame, ...@@ -355,8 +355,8 @@ static LRESULT MDISetMenu( HWND hwnd, HMENU hmenuFrame,
HMENU oldFrameMenu = ci->hFrameMenu; HMENU oldFrameMenu = ci->hFrameMenu;
ci->hFrameMenu = hmenuFrame; ci->hFrameMenu = hmenuFrame;
if (IsZoomed(ci->hwndActiveChild) && (GetWindowLongW(ci->hwndActiveChild, GWL_STYLE) & WS_VISIBLE)) if (ci->hwndChildMaximized && (GetWindowLongW(ci->hwndChildMaximized, GWL_STYLE) & WS_VISIBLE))
MDI_AugmentFrameMenu( hwndFrame, ci->hwndActiveChild ); MDI_AugmentFrameMenu( hwndFrame, ci->hwndChildMaximized );
return (LRESULT)oldFrameMenu; return (LRESULT)oldFrameMenu;
} }
...@@ -369,8 +369,8 @@ static LRESULT MDISetMenu( HWND hwnd, HMENU hmenuFrame, ...@@ -369,8 +369,8 @@ static LRESULT MDISetMenu( HWND hwnd, HMENU hmenuFrame,
* that the "if" to this "else" wouldn't catch the need to * that the "if" to this "else" wouldn't catch the need to
* augment the frame menu. * augment the frame menu.
*/ */
if( IsZoomed(ci->hwndActiveChild) ) if( ci->hwndChildMaximized )
MDI_AugmentFrameMenu( hwndFrame, ci->hwndActiveChild ); MDI_AugmentFrameMenu( hwndFrame, ci->hwndChildMaximized );
} }
return 0; return 0;
...@@ -685,8 +685,8 @@ static LONG MDICascade( HWND client, MDICLIENTINFO *ci ) ...@@ -685,8 +685,8 @@ static LONG MDICascade( HWND client, MDICLIENTINFO *ci )
BOOL has_icons = FALSE; BOOL has_icons = FALSE;
int i, total; int i, total;
if (IsZoomed(ci->hwndActiveChild)) if (ci->hwndChildMaximized)
SendMessageW(client, WM_MDIRESTORE, (WPARAM)ci->hwndActiveChild, 0); SendMessageW(client, WM_MDIRESTORE, (WPARAM)ci->hwndChildMaximized, 0);
if (ci->nActiveChildren == 0) return 0; if (ci->nActiveChildren == 0) return 0;
...@@ -738,8 +738,8 @@ static void MDITile( HWND client, MDICLIENTINFO *ci, WPARAM wParam ) ...@@ -738,8 +738,8 @@ static void MDITile( HWND client, MDICLIENTINFO *ci, WPARAM wParam )
int i, total; int i, total;
BOOL has_icons = FALSE; BOOL has_icons = FALSE;
if (IsZoomed(ci->hwndActiveChild)) if (ci->hwndChildMaximized)
SendMessageW(client, WM_MDIRESTORE, (WPARAM)ci->hwndActiveChild, 0); SendMessageW(client, WM_MDIRESTORE, (WPARAM)ci->hwndChildMaximized, 0);
if (ci->nActiveChildren == 0) return; if (ci->nActiveChildren == 0) return;
...@@ -974,7 +974,7 @@ static void MDI_UpdateFrameText( HWND frame, HWND hClient, BOOL repaint, LPCWSTR ...@@ -974,7 +974,7 @@ static void MDI_UpdateFrameText( HWND frame, HWND hClient, BOOL repaint, LPCWSTR
if (ci->frameTitle) 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 */ /* combine frame title and child title if possible */
...@@ -1481,7 +1481,7 @@ LRESULT WINAPI DefMDIChildProcW( HWND hwnd, UINT message, ...@@ -1481,7 +1481,7 @@ LRESULT WINAPI DefMDIChildProcW( HWND hwnd, UINT message,
switch( wParam ) switch( wParam )
{ {
case SC_MOVE: case SC_MOVE:
if( ci->hwndActiveChild == hwnd && IsZoomed(ci->hwndActiveChild)) if( ci->hwndChildMaximized == hwnd )
return 0; return 0;
break; break;
case SC_RESTORE: case SC_RESTORE:
...@@ -1502,7 +1502,7 @@ LRESULT WINAPI DefMDIChildProcW( HWND hwnd, UINT message, ...@@ -1502,7 +1502,7 @@ LRESULT WINAPI DefMDIChildProcW( HWND hwnd, UINT message,
case WM_SHOWWINDOW: case WM_SHOWWINDOW:
case WM_SETVISIBLE: 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); else MDI_PostUpdate(client, ci, SB_BOTH+1);
break; break;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment