user32: Also test parent messages when hiding child window.

This commit is contained in:
Clinton Stimpson 2007-07-26 19:27:53 -06:00 committed by Alexandre Julliard
parent 9ee4d8509b
commit f4af6455a8
1 changed files with 18 additions and 0 deletions

View File

@ -727,6 +727,15 @@ static const struct message WmHideChildSeq[] = {
{ WM_WINDOWPOSCHANGED, sent|wparam, SWP_HIDEWINDOW|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE|SWP_NOCLIENTSIZE|SWP_NOCLIENTMOVE },
{ 0 }
};
/* ShowWindow(SW_HIDE) for a visible child window checking all parent events*/
static const struct message WmHideChildSeq2[] = {
{ WM_SHOWWINDOW, sent|wparam, 0 },
{ WM_WINDOWPOSCHANGING, sent|wparam, SWP_HIDEWINDOW|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE },
{ EVENT_OBJECT_HIDE, winevent_hook|wparam|lparam, 0, 0 },
{ WM_ERASEBKGND, sent|parent },
{ WM_WINDOWPOSCHANGED, sent|wparam, SWP_HIDEWINDOW|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE|SWP_NOCLIENTSIZE|SWP_NOCLIENTMOVE },
{ 0 }
};
/* SetWindowPos(SWP_SHOWWINDOW|SWP_NOSIZE|SWP_NOMOVE)
* for a not visible child window
*/
@ -3982,6 +3991,15 @@ static void test_messages(void)
ShowWindow(hchild, SW_SHOW);
ok_sequence(WmShowChildSeq, "ShowWindow(SW_SHOW):child", FALSE);
/* check parent messages too */
log_all_parent_messages++;
ShowWindow(hchild, SW_HIDE);
ok_sequence(WmHideChildSeq2, "ShowWindow(SW_HIDE):child", TRUE);
log_all_parent_messages--;
ShowWindow(hchild, SW_SHOW);
ok_sequence(WmShowChildSeq, "ShowWindow(SW_SHOW):child", FALSE);
ShowWindow(hchild, SW_HIDE);
ok_sequence(WmHideChildSeq, "ShowWindow(SW_HIDE):child", FALSE);