Do nothing in ShowWindow(SW_SHOW) if a window is already visible.

This commit is contained in:
Dmitry Timoshkov 2004-06-14 19:32:21 +00:00 committed by Alexandre Julliard
parent eb25084eee
commit 4e23f101f3
1 changed files with 4 additions and 2 deletions

View File

@ -1276,10 +1276,10 @@ BOOL X11DRV_ShowWindow( HWND hwnd, INT cmd )
if (!wndPtr) return FALSE;
hwnd = wndPtr->hwndSelf; /* make it a full handle */
TRACE("hwnd=%p, cmd=%d\n", hwnd, cmd);
wasVisible = (wndPtr->dwStyle & WS_VISIBLE) != 0;
TRACE("hwnd=%p, cmd=%d, wasVisible %d\n", hwnd, cmd, wasVisible);
switch(cmd)
{
case SW_HIDE:
@ -1313,6 +1313,8 @@ BOOL X11DRV_ShowWindow( HWND hwnd, INT cmd )
swp |= SWP_NOACTIVATE | SWP_NOZORDER;
/* fall through */
case SW_SHOW:
if (wasVisible) goto END;
swp |= SWP_SHOWWINDOW | SWP_NOSIZE | SWP_NOMOVE;
/*