Signed-off-by: Connor McAdams cmcadams@codeweavers.com --- dlls/user32/tests/msg.c | 73 +++++++++++++++++++++++++++++++++++------ 1 file changed, 63 insertions(+), 10 deletions(-)
diff --git a/dlls/user32/tests/msg.c b/dlls/user32/tests/msg.c index 5b7695f63a2..e8b6f3e883e 100644 --- a/dlls/user32/tests/msg.c +++ b/dlls/user32/tests/msg.c @@ -13277,15 +13277,19 @@ static void test_SetWindowRgn(void) static const struct message WmShowNormal[] = { { WM_SHOWWINDOW, sent|wparam, 1 }, { WM_WINDOWPOSCHANGING, sent|wparam, SWP_SHOWWINDOW|SWP_NOSIZE|SWP_NOMOVE }, + { EVENT_OBJECT_SHOW, winevent_hook|wparam|lparam|optional, 0, 0 }, { HCBT_ACTIVATE, hook }, + { EVENT_SYSTEM_FOREGROUND, winevent_hook|wparam|lparam|optional, 0, 0 }, { WM_WINDOWPOSCHANGING, sent|wparam|optional, SWP_NOSIZE|SWP_NOMOVE }, /* win2003 doesn't send it */ { HCBT_SETFOCUS, hook }, + { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam|optional, OBJID_CLIENT, 0 }, { WM_WINDOWPOSCHANGED, sent|wparam, SWP_SHOWWINDOW|SWP_NOSIZE|SWP_NOMOVE|SWP_NOCLIENTSIZE|SWP_NOCLIENTMOVE }, { 0 } }; static const struct message WmShow[] = { { WM_SHOWWINDOW, sent|wparam, 1 }, { WM_WINDOWPOSCHANGING, sent|wparam, SWP_SHOWWINDOW|SWP_NOSIZE|SWP_NOMOVE }, + { EVENT_OBJECT_SHOW, winevent_hook|wparam|lparam|optional, 0, 0 }, { HCBT_ACTIVATE, hook|optional }, /* win2000 doesn't send it */ { WM_WINDOWPOSCHANGING, sent|wparam|optional, SWP_NOSIZE|SWP_NOMOVE }, /* win2000 doesn't send it */ { HCBT_SETFOCUS, hook|optional }, /* win2000 doesn't send it */ @@ -13295,14 +13299,18 @@ static const struct message WmShow[] = { static const struct message WmShowNoActivate_1[] = { { HCBT_MINMAX, hook|lparam, 0, SW_SHOWNOACTIVATE }, { WM_WINDOWPOSCHANGING, sent|wparam, SWP_SHOWWINDOW|SWP_NOACTIVATE|SWP_FRAMECHANGED|SWP_STATECHANGED, 0, SWP_NOCLIENTSIZE|SWP_NOCLIENTMOVE|SWP_NOSIZE|SWP_NOMOVE }, + { EVENT_OBJECT_SHOW, winevent_hook|wparam|lparam|optional, 0, 0 }, { WM_WINDOWPOSCHANGED, sent|wparam, SWP_SHOWWINDOW|SWP_NOACTIVATE|SWP_FRAMECHANGED|SWP_STATECHANGED, 0, SWP_NOCLIENTSIZE|SWP_NOCLIENTMOVE|SWP_NOSIZE|SWP_NOMOVE }, { WM_MOVE, sent|defwinproc|optional }, { WM_SIZE, sent|wparam|defwinproc, SIZE_RESTORED }, + { EVENT_OBJECT_LOCATIONCHANGE, winevent_hook|wparam|lparam|optional, 0, 0 }, { 0 } }; static const struct message WmShowNoActivate_2[] = { { HCBT_MINMAX, hook|lparam, 0, SW_SHOWNOACTIVATE }, { WM_WINDOWPOSCHANGING, sent|wparam, SWP_SHOWWINDOW|SWP_NOACTIVATE|SWP_FRAMECHANGED|SWP_NOCOPYBITS|SWP_STATECHANGED, 0, SWP_NOACTIVATE }, + { EVENT_OBJECT_REORDER, winevent_hook|wparam|lparam|optional, 0, 0 }, + { EVENT_OBJECT_SHOW, winevent_hook|wparam|lparam|optional, 0, 0 }, { HCBT_ACTIVATE, hook|optional }, { WM_WINDOWPOSCHANGING, sent|wparam|optional, SWP_NOSIZE|SWP_NOMOVE }, { HCBT_SETFOCUS, hook|optional }, @@ -13314,11 +13322,14 @@ static const struct message WmShowNoActivate_2[] = { { WM_WINDOWPOSCHANGING, sent|wparam|optional, SWP_NOSIZE|SWP_NOMOVE }, /* win2003 doesn't send it */ { WM_WINDOWPOSCHANGED, sent|wparam|optional, SWP_NOSIZE|SWP_NOMOVE|SWP_NOCLIENTSIZE|SWP_NOCLIENTMOVE }, { HCBT_SETFOCUS, hook|optional }, /* win2003 doesn't send it */ + { EVENT_OBJECT_LOCATIONCHANGE, winevent_hook|wparam|lparam|optional, 0, 0 }, + { EVENT_SYSTEM_MINIMIZEEND, winevent_hook|wparam|lparam|optional, 0, 0 }, { 0 } }; static const struct message WmShowNA_1[] = { { WM_SHOWWINDOW, sent|wparam, 1 }, { WM_WINDOWPOSCHANGING, sent|wparam, SWP_SHOWWINDOW|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE }, + { EVENT_OBJECT_SHOW, winevent_hook|wparam|lparam|optional, 0, 0 }, { WM_WINDOWPOSCHANGED, sent|wparam, SWP_SHOWWINDOW|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE|SWP_NOCLIENTSIZE|SWP_NOCLIENTMOVE }, { 0 } }; @@ -13331,18 +13342,24 @@ static const struct message WmShowNA_2[] = { static const struct message WmRestore_1[] = { { HCBT_MINMAX, hook|lparam, 0, SW_RESTORE }, { WM_WINDOWPOSCHANGING, sent|wparam, SWP_SHOWWINDOW|SWP_FRAMECHANGED|SWP_NOCOPYBITS|SWP_STATECHANGED }, + { EVENT_OBJECT_REORDER, winevent_hook|wparam|lparam|optional, 0, 0 }, + { EVENT_OBJECT_SHOW, winevent_hook|wparam|lparam|optional, 0, 0 }, { HCBT_ACTIVATE, hook|optional }, /* win2000 doesn't send it */ { WM_WINDOWPOSCHANGING, sent|wparam|optional, SWP_NOSIZE|SWP_NOMOVE }, /* win2000 doesn't send it */ { HCBT_SETFOCUS, hook|optional }, /* win2000 doesn't send it */ { WM_WINDOWPOSCHANGED, sent|wparam, SWP_SHOWWINDOW|SWP_FRAMECHANGED|SWP_NOCOPYBITS|SWP_STATECHANGED }, { WM_MOVE, sent|defwinproc }, { WM_SIZE, sent|wparam|defwinproc, SIZE_RESTORED }, + { EVENT_OBJECT_LOCATIONCHANGE, winevent_hook|wparam|lparam|optional, 0, 0 }, + { EVENT_SYSTEM_MINIMIZEEND, winevent_hook|wparam|lparam|optional, 0, 0 }, { HCBT_SETFOCUS, hook|optional }, /* win2000 sends it */ + { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam|optional, OBJID_CLIENT, 0 }, { 0 } }; static const struct message WmRestore_2[] = { { WM_SHOWWINDOW, sent|wparam, 1 }, { WM_WINDOWPOSCHANGING, sent|wparam, SWP_SHOWWINDOW|SWP_NOSIZE|SWP_NOMOVE }, + { EVENT_OBJECT_SHOW, winevent_hook|wparam|lparam|optional, 0, 0 }, { HCBT_ACTIVATE, hook|optional }, /* win2000 doesn't send it */ { WM_WINDOWPOSCHANGING, sent|wparam|optional, SWP_NOSIZE|SWP_NOMOVE }, /* win2000 doesn't send it */ { HCBT_SETFOCUS, hook|optional }, /* win2000 doesn't send it */ @@ -13353,13 +13370,18 @@ static const struct message WmRestore_3[] = { { HCBT_MINMAX, hook|lparam, 0, SW_RESTORE }, { WM_GETMINMAXINFO, sent }, { WM_WINDOWPOSCHANGING, sent|wparam, SWP_FRAMECHANGED|SWP_NOCOPYBITS|SWP_STATECHANGED }, + { EVENT_OBJECT_REORDER, winevent_hook|wparam|lparam|optional, 0, 0 }, { HCBT_ACTIVATE, hook|optional }, /* win2003 doesn't send it */ + { EVENT_SYSTEM_FOREGROUND, winevent_hook|wparam|lparam|optional, 0, 0 }, { WM_WINDOWPOSCHANGING, sent|wparam|optional, SWP_NOSIZE|SWP_NOMOVE }, /* win2003 doesn't send it */ { HCBT_SETFOCUS, hook|optional }, /* win2003 doesn't send it */ + { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam|optional, OBJID_CLIENT, 0 }, { WM_WINDOWPOSCHANGED, sent|wparam, SWP_FRAMECHANGED|SWP_NOCOPYBITS|SWP_STATECHANGED }, { WM_MOVE, sent|defwinproc }, { WM_SIZE, sent|wparam|defwinproc, SIZE_MAXIMIZED }, { HCBT_SETFOCUS, hook|optional }, /* win2003 sends it */ + { EVENT_OBJECT_LOCATIONCHANGE, winevent_hook|wparam|lparam|optional, 0, 0 }, + { EVENT_SYSTEM_MINIMIZEEND, winevent_hook|wparam|lparam|optional, 0, 0 }, { 0 } }; static const struct message WmRestore_4[] = { @@ -13368,6 +13390,7 @@ static const struct message WmRestore_4[] = { { WM_WINDOWPOSCHANGED, sent|wparam|optional, SWP_FRAMECHANGED|SWP_STATECHANGED, 0, SWP_NOCLIENTSIZE|SWP_NOCLIENTMOVE|SWP_NOSIZE|SWP_NOMOVE }, { WM_MOVE, sent|defwinproc|optional }, { WM_SIZE, sent|wparam|defwinproc|optional, SIZE_RESTORED }, + { EVENT_OBJECT_LOCATIONCHANGE, winevent_hook|wparam|lparam|optional, 0, 0 }, { 0 } }; static const struct message WmRestore_5[] = { @@ -13378,19 +13401,23 @@ static const struct message WmRestore_5[] = { { WM_WINDOWPOSCHANGED, sent|wparam|optional, SWP_FRAMECHANGED|SWP_STATECHANGED, 0, SWP_NOCLIENTSIZE|SWP_NOCLIENTMOVE|SWP_NOSIZE|SWP_NOMOVE }, { WM_MOVE, sent|defwinproc|optional }, { WM_SIZE, sent|wparam|defwinproc|optional, SIZE_RESTORED }, + { EVENT_OBJECT_LOCATIONCHANGE, winevent_hook|wparam|lparam|optional, 0, 0 }, { 0 } }; static const struct message WmHide_1[] = { { WM_SHOWWINDOW, sent|wparam, 0 }, { WM_WINDOWPOSCHANGING, sent|wparam, SWP_HIDEWINDOW|SWP_NOSIZE|SWP_NOMOVE, 0, SWP_NOACTIVATE }, + { EVENT_OBJECT_HIDE, winevent_hook|wparam|lparam|optional, 0, 0 }, { WM_WINDOWPOSCHANGED, sent|wparam, SWP_HIDEWINDOW|SWP_NOSIZE|SWP_NOMOVE|SWP_NOCLIENTSIZE|SWP_NOCLIENTMOVE, 0, SWP_NOACTIVATE }, { HCBT_ACTIVATE, hook|optional }, { HCBT_SETFOCUS, hook|optional }, /* win2000 sends it */ + { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam|optional, OBJID_CLIENT, 0 }, { 0 } }; static const struct message WmHide_2[] = { { WM_SHOWWINDOW, sent|wparam, 0 }, { WM_WINDOWPOSCHANGING, sent /*|wparam, SWP_HIDEWINDOW|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE*/ }, /* win2000 doesn't add SWP_NOACTIVATE */ + { EVENT_OBJECT_HIDE, winevent_hook|wparam|lparam|optional, 0, 0 }, { WM_WINDOWPOSCHANGED, sent /*|wparam, SWP_HIDEWINDOW|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE|SWP_NOCLIENTSIZE|SWP_NOCLIENTMOVE*/ }, /* win2000 doesn't add SWP_NOACTIVATE */ { HCBT_ACTIVATE, hook|optional }, { 0 } @@ -13398,53 +13425,69 @@ static const struct message WmHide_2[] = { static const struct message WmHide_3[] = { { WM_SHOWWINDOW, sent|wparam, 0 }, { WM_WINDOWPOSCHANGING, sent|wparam, SWP_HIDEWINDOW|SWP_NOSIZE|SWP_NOMOVE }, + { EVENT_OBJECT_HIDE, winevent_hook|wparam|lparam|optional, 0, 0 }, { WM_WINDOWPOSCHANGED, sent|wparam, SWP_HIDEWINDOW|SWP_NOSIZE|SWP_NOMOVE|SWP_NOCLIENTSIZE|SWP_NOCLIENTMOVE }, { HCBT_SETFOCUS, hook|optional }, - { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 }, + { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam|optional, OBJID_CLIENT, 0 }, { 0 } }; static const struct message WmShowMinimized_1[] = { { HCBT_MINMAX, hook|lparam, 0, SW_SHOWMINIMIZED }, { WM_WINDOWPOSCHANGING, sent|wparam, SWP_SHOWWINDOW|SWP_FRAMECHANGED|SWP_NOCOPYBITS|SWP_STATECHANGED }, + { EVENT_OBJECT_REORDER, winevent_hook|wparam|lparam|optional, 0, 0 }, + { EVENT_OBJECT_SHOW, winevent_hook|wparam|lparam|optional, 0, 0 }, { HCBT_ACTIVATE, hook|optional }, /* win2000 doesn't send it */ { WM_WINDOWPOSCHANGING, sent|wparam|optional, SWP_NOSIZE|SWP_NOMOVE }, /* win2000 doesn't send it */ { WM_WINDOWPOSCHANGED, sent|wparam, SWP_SHOWWINDOW|SWP_FRAMECHANGED|SWP_NOCOPYBITS|SWP_STATECHANGED }, { WM_MOVE, sent|defwinproc }, { WM_SIZE, sent|wparam|lparam|defwinproc, SIZE_MINIMIZED, 0 }, + { EVENT_OBJECT_LOCATIONCHANGE, winevent_hook|wparam|lparam|optional, 0, 0 }, + { EVENT_SYSTEM_MINIMIZESTART, winevent_hook|wparam|lparam|optional, 0, 0 }, { 0 } }; static const struct message WmMinimize_1[] = { { HCBT_MINMAX, hook|lparam, 0, SW_MINIMIZE }, { HCBT_SETFOCUS, hook|optional }, /* win2000 doesn't send it */ - { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 }, + { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam|optional, OBJID_CLIENT, 0 }, { WM_WINDOWPOSCHANGING, sent|wparam, SWP_SHOWWINDOW|SWP_NOACTIVATE|SWP_FRAMECHANGED|SWP_NOCOPYBITS|SWP_STATECHANGED }, + { EVENT_OBJECT_REORDER, winevent_hook|wparam|lparam|optional, 0, 0 }, { WM_WINDOWPOSCHANGED, sent|wparam, SWP_NOACTIVATE|SWP_FRAMECHANGED|SWP_NOCOPYBITS|SWP_STATECHANGED }, { WM_MOVE, sent|defwinproc }, { WM_SIZE, sent|wparam|lparam|defwinproc, SIZE_MINIMIZED, 0 }, + { EVENT_OBJECT_LOCATIONCHANGE, winevent_hook|wparam|lparam|optional, 0, 0 }, + { EVENT_SYSTEM_MINIMIZESTART, winevent_hook|wparam|lparam|optional, 0, 0 }, { 0 } }; static const struct message WmMinimize_2[] = { { HCBT_MINMAX, hook|lparam, 0, SW_MINIMIZE }, { HCBT_SETFOCUS, hook|optional }, { WM_WINDOWPOSCHANGING, sent|wparam, SWP_SHOWWINDOW|SWP_NOACTIVATE|SWP_FRAMECHANGED|SWP_NOCOPYBITS|SWP_STATECHANGED, 0, SWP_NOACTIVATE }, + { EVENT_OBJECT_REORDER, winevent_hook|wparam|lparam|optional, 0, 0 }, { WM_WINDOWPOSCHANGED, sent|wparam, SWP_NOACTIVATE|SWP_FRAMECHANGED|SWP_NOCOPYBITS|SWP_STATECHANGED, 0, SWP_NOACTIVATE }, { WM_MOVE, sent|defwinproc }, { WM_SIZE, sent|wparam|lparam|defwinproc, SIZE_MINIMIZED, 0 }, + { EVENT_OBJECT_LOCATIONCHANGE, winevent_hook|wparam|lparam|optional, 0, 0 }, + { EVENT_SYSTEM_MINIMIZESTART, winevent_hook|wparam|lparam|optional, 0, 0 }, { 0 } }; static const struct message WmMinimize_3[] = { { HCBT_MINMAX, hook|lparam, 0, SW_MINIMIZE }, { WM_WINDOWPOSCHANGING, sent|wparam, SWP_SHOWWINDOW|SWP_NOACTIVATE|SWP_FRAMECHANGED|SWP_NOCOPYBITS|SWP_STATECHANGED, 0, SWP_NOACTIVATE }, + { EVENT_OBJECT_REORDER, winevent_hook|wparam|lparam|optional, 0, 0 }, + { EVENT_OBJECT_SHOW, winevent_hook|wparam|lparam|optional, 0, 0 }, { HCBT_ACTIVATE, hook|optional }, { WM_WINDOWPOSCHANGING, sent|wparam|optional, SWP_NOSIZE|SWP_NOMOVE }, { WM_WINDOWPOSCHANGED, sent|wparam, SWP_SHOWWINDOW|SWP_NOACTIVATE|SWP_FRAMECHANGED|SWP_NOCOPYBITS|SWP_STATECHANGED, 0, SWP_NOACTIVATE }, { WM_MOVE, sent|defwinproc }, { WM_SIZE, sent|wparam|lparam|defwinproc, SIZE_MINIMIZED, 0 }, + { EVENT_OBJECT_LOCATIONCHANGE, winevent_hook|wparam|lparam|optional, 0, 0 }, + { EVENT_SYSTEM_MINIMIZESTART, winevent_hook|wparam|lparam|optional, 0, 0 }, { 0 } }; static const struct message WmShowMinNoActivate[] = { { HCBT_MINMAX, hook|lparam, 0, SW_SHOWMINNOACTIVE }, { WM_WINDOWPOSCHANGING, sent }, + { EVENT_OBJECT_SHOW, winevent_hook|wparam|lparam|optional, 0, 0 }, { WM_WINDOWPOSCHANGED, sent }, { WM_MOVE, sent|defwinproc|optional }, { WM_SIZE, sent|wparam|lparam|defwinproc|optional, SIZE_MINIMIZED, 0 }, @@ -13484,13 +13527,18 @@ static const struct message WmShowMaximized_1[] = { { HCBT_MINMAX, hook|lparam, 0, SW_SHOWMAXIMIZED }, { WM_GETMINMAXINFO, sent }, { WM_WINDOWPOSCHANGING, sent|wparam, SWP_SHOWWINDOW|SWP_FRAMECHANGED|SWP_NOCOPYBITS|SWP_STATECHANGED }, + { EVENT_OBJECT_REORDER, winevent_hook|wparam|lparam|optional, 0, 0 }, + { EVENT_OBJECT_SHOW, winevent_hook|wparam|lparam|optional, 0, 0 }, { HCBT_ACTIVATE, hook|optional }, /* win2000 doesn't send it */ { WM_WINDOWPOSCHANGING, sent|wparam|optional, SWP_NOSIZE|SWP_NOMOVE }, /* win2000 doesn't send it */ { HCBT_SETFOCUS, hook|optional }, /* win2000 doesn't send it */ { WM_WINDOWPOSCHANGED, sent|wparam, SWP_SHOWWINDOW|SWP_FRAMECHANGED|SWP_NOCOPYBITS|SWP_STATECHANGED }, { WM_MOVE, sent|defwinproc }, { WM_SIZE, sent|wparam|defwinproc, SIZE_MAXIMIZED }, + { EVENT_OBJECT_LOCATIONCHANGE, winevent_hook|wparam|lparam|optional, 0, 0 }, + { EVENT_SYSTEM_MINIMIZEEND, winevent_hook|wparam|lparam|optional, 0, 0 }, { HCBT_SETFOCUS, hook|optional }, /* win2003 sends it */ + { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam|optional, OBJID_CLIENT, 0 }, { 0 } }; static const struct message WmShowMaximized_2[] = { @@ -13503,10 +13551,14 @@ static const struct message WmShowMaximized_2[] = { { WM_SIZE, sent|wparam|optional, SIZE_MAXIMIZED }, /* Win9x doesn't send it */ { WM_WINDOWPOSCHANGING, sent|optional }, { HCBT_SETFOCUS, hook|optional }, + { EVENT_OBJECT_REORDER, winevent_hook|wparam|lparam|optional, 0, 0 }, { WM_WINDOWPOSCHANGED, sent|wparam|optional, SWP_FRAMECHANGED|SWP_NOCOPYBITS|SWP_STATECHANGED }, { WM_MOVE, sent|defwinproc }, { WM_SIZE, sent|wparam|defwinproc, SIZE_MAXIMIZED }, + { EVENT_OBJECT_LOCATIONCHANGE, winevent_hook|wparam|lparam|optional, 0, 0 }, + { EVENT_SYSTEM_MINIMIZEEND, winevent_hook|wparam|lparam|optional, 0, 0 }, { HCBT_SETFOCUS, hook|optional }, + { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam|optional, OBJID_CLIENT, 0 }, { 0 } }; static const struct message WmShowMaximized_3[] = { @@ -13519,6 +13571,7 @@ static const struct message WmShowMaximized_3[] = { { WM_WINDOWPOSCHANGED, sent|wparam, SWP_FRAMECHANGED|SWP_STATECHANGED, 0, SWP_NOCLIENTSIZE|SWP_NOCLIENTMOVE|SWP_NOSIZE|SWP_NOMOVE }, { WM_MOVE, sent|defwinproc|optional }, { WM_SIZE, sent|wparam|defwinproc, SIZE_MAXIMIZED }, + { EVENT_OBJECT_LOCATIONCHANGE, winevent_hook|wparam|lparam|optional, 0, 0 }, { 0 } };
@@ -18293,6 +18346,14 @@ START_TEST(msg) test_InSendMessage(); test_SetFocus(); test_SetParent(); + test_PostMessage(); + test_broadcast(); + test_ShowWindow(); + test_PeekMessage(); + test_PeekMessage2(); + test_PeekMessage3(); + test_WaitForInputIdle( test_argv[0] ); + test_scrollwindowex();
/* Fix message sequences before removing 4 lines below */ if (pUnhookWinEvent && hEvent_hook) @@ -18303,14 +18364,6 @@ START_TEST(msg) } hEvent_hook = 0;
- test_PostMessage(); - test_broadcast(); - test_ShowWindow(); - test_PeekMessage(); - test_PeekMessage2(); - test_PeekMessage3(); - test_WaitForInputIdle( test_argv[0] ); - test_scrollwindowex(); test_messages(); test_setwindowpos(); test_showwindow();