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