Commit eff34efc authored by Mike Hearn's avatar Mike Hearn Committed by Alexandre Julliard

Ignore attempts to hide an already invisible window. Add a test case

for this behaviour, passes on Wine and Windows 2000.
parent a1e8ba9f
......@@ -145,6 +145,10 @@ static const struct message WmHideOverlappedSeq[] = {
{ WM_IME_SETCONTEXT, sent|wparam|optional, 0 },
{ 0 }
};
/* ShowWindow(SW_HIDE) for an invisible overlapped window */
static const struct message WmHideInvisibleOverlappedSeq[] = {
{ 0 }
};
/* DestroyWindow for a visible overlapped window */
static const struct message WmDestroyOverlappedSeq[] = {
{ HCBT_DESTROYWND, hook },
......@@ -756,6 +760,10 @@ static void test_messages(void)
ok (hwnd != 0, "Failed to create overlapped window\n");
ok_sequence(WmCreateOverlappedSeq, "CreateWindow:overlapped");
/* test ShowWindow(SW_HIDE) on a newly created invisible window */
ok( ShowWindow(hwnd, SW_HIDE) == FALSE, "ShowWindow: window was visible\n" );
ok_sequence(WmHideInvisibleOverlappedSeq, "ShowWindow(SW_HIDE):overlapped, invisible");
/* test WM_SETREDRAW on a not visible top level window */
test_WM_SETREDRAW(hwnd);
......
......@@ -1283,6 +1283,7 @@ BOOL X11DRV_ShowWindow( HWND hwnd, INT cmd )
switch(cmd)
{
case SW_HIDE:
if (!wasVisible) goto END;
swp |= SWP_HIDEWINDOW | SWP_NOSIZE | SWP_NOMOVE |
SWP_NOACTIVATE | SWP_NOZORDER;
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