Sending WM_SHOWWINDOW is a job of SetWindowPos.

This commit is contained in:
Dmitry Timoshkov 2004-04-02 20:14:15 +00:00 committed by Alexandre Julliard
parent 0ad1a6c6dd
commit 85571bb128

View file

@ -553,10 +553,20 @@ static BOOL SWP_DoWinPosChanging( WINDOWPOS* pWinpos, RECT* pNewWindowRect, RECT
{
WND *wndPtr;
if (pWinpos->flags & (SWP_SHOWWINDOW | SWP_HIDEWINDOW))
{
BOOL wasVisible, showFlag;
wasVisible = (GetWindowLongW(pWinpos->hwnd, GWL_STYLE) & WS_VISIBLE) != 0;
showFlag = !(pWinpos->flags & SWP_HIDEWINDOW);
if (showFlag != wasVisible)
SendMessageW(pWinpos->hwnd, WM_SHOWWINDOW, showFlag, 0);
}
/* Send WM_WINDOWPOSCHANGING message */
if (!(pWinpos->flags & SWP_NOSENDCHANGING))
SendMessageA( pWinpos->hwnd, WM_WINDOWPOSCHANGING, 0, (LPARAM)pWinpos );
SendMessageW( pWinpos->hwnd, WM_WINDOWPOSCHANGING, 0, (LPARAM)pWinpos );
if (!(wndPtr = WIN_GetPtr( pWinpos->hwnd )) || wndPtr == WND_OTHER_PROCESS) return FALSE;
@ -1256,7 +1266,7 @@ UINT WINPOS_MinMaximize( HWND hwnd, UINT cmd, LPRECT rect )
BOOL X11DRV_ShowWindow( HWND hwnd, INT cmd )
{
WND* wndPtr = WIN_FindWndPtr( hwnd );
BOOL wasVisible, showFlag;
BOOL wasVisible;
RECT newPos = {0, 0, 0, 0};
UINT swp = 0;
@ -1326,13 +1336,6 @@ BOOL X11DRV_ShowWindow( HWND hwnd, INT cmd )
break;
}
showFlag = (cmd != SW_HIDE);
if (showFlag != wasVisible)
{
SendMessageA( hwnd, WM_SHOWWINDOW, showFlag, 0 );
if (!IsWindow( hwnd )) goto END;
}
/* We can't activate a child window */
if ((wndPtr->dwStyle & WS_CHILD) &&
!(wndPtr->dwExStyle & WS_EX_MDICHILD))