Deactivate active window in ShowWindow(,SW_HIDE).

This commit is contained in:
Vitaliy Margolen 2005-06-17 21:05:16 +00:00 committed by Alexandre Julliard
parent 6394a15314
commit fb99124f94
2 changed files with 4 additions and 1 deletions

View File

@ -2939,6 +2939,7 @@ static void test_messages(void)
SetWindowPos(hwnd, 0,0,0,0,0, SWP_HIDEWINDOW|SWP_NOSIZE|SWP_NOMOVE);
ok_sequence(WmSWP_HideOverlappedSeq, "SetWindowPos:SWP_HIDEWINDOW:overlapped", FALSE);
ok(!IsWindowVisible(hwnd), "window should not be visible at this point\n");
ok(GetActiveWindow() == hwnd, "window should still be active\n");
/* test WM_SETREDRAW on a visible top level window */
ShowWindow(hwnd, SW_SHOW);

View File

@ -934,7 +934,9 @@ BOOL X11DRV_ShowWindow( HWND hwnd, INT cmd )
case SW_HIDE:
if (!wasVisible) return FALSE;
showFlag = FALSE;
swp |= SWP_HIDEWINDOW | SWP_NOSIZE | SWP_NOMOVE | SWP_NOZORDER;
swp |= SWP_HIDEWINDOW | SWP_NOSIZE | SWP_NOMOVE;
if (hwnd != GetActiveWindow())
swp |= SWP_NOACTIVATE | SWP_NOZORDER;
break;
case SW_SHOWMINNOACTIVE: