Signed-off-by: Connor McAdams cmcadams@codeweavers.com --- dlls/user32/tests/msg.c | 56 ++++++++++++++++++++++++++++++++++++++++- 1 file changed, 55 insertions(+), 1 deletion(-)
diff --git a/dlls/user32/tests/msg.c b/dlls/user32/tests/msg.c index fa528c86a79..633bd19dc46 100644 --- a/dlls/user32/tests/msg.c +++ b/dlls/user32/tests/msg.c @@ -2134,30 +2134,47 @@ static const struct message WmSHOWNATopInvisible[] = {
static const struct message WmTrackPopupMenuMinimizeWindow[] = { { HCBT_CREATEWND, hook }, + { EVENT_OBJECT_CREATE, winevent_hook|wparam|lparam|winevent_hook_todo, 0, 0 }, { WM_ENTERMENULOOP, sent|wparam|lparam, TRUE, 0 }, + { EVENT_SYSTEM_CAPTURESTART, winevent_hook|wparam|lparam|winevent_hook_todo, 0, 0 }, { WM_INITMENU, sent|lparam, 0, 0 }, + { EVENT_SYSTEM_MENUSTART, winevent_hook|wparam|lparam|winevent_hook_todo, 0, 0 }, { WM_INITMENUPOPUP, sent|lparam, 0, 0 }, { 0x0093, sent|optional }, { 0x0094, sent|optional }, { 0x0094, sent|optional }, + { EVENT_OBJECT_LOCATIONCHANGE, winevent_hook|wparam|lparam|winevent_hook_todo, 0, 0 }, + { EVENT_OBJECT_SHOW, winevent_hook|wparam|lparam|winevent_hook_todo, 0, 0 }, + { EVENT_OBJECT_LOCATIONCHANGE, winevent_hook|wparam|lparam|optional, 0, 0 }, + { EVENT_SYSTEM_MENUPOPUPSTART, winevent_hook|wparam|lparam|winevent_hook_todo, OBJID_CLIENT, 0 }, { WM_ENTERIDLE, sent|wparam, 2 }, { HCBT_MINMAX, hook }, { HCBT_SETFOCUS, hook }, + { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam|winevent_hook_todo, OBJID_CLIENT, 0 }, { WM_KILLFOCUS, sent|wparam, 0 }, { WM_GETTEXT, sent|optional }, { WM_WINDOWPOSCHANGING, sent }, { WM_GETMINMAXINFO, sent|defwinproc }, { WM_NCCALCSIZE, sent|wparam|optional, 1 }, + { EVENT_OBJECT_REORDER, winevent_hook|wparam|lparam|winevent_hook_todo, 0, 0 }, { WM_WINDOWPOSCHANGED, sent }, { WM_MOVE, sent|defwinproc }, { WM_SIZE, sent|defwinproc }, { WM_GETTEXT, sent|optional }, { WM_NCCALCSIZE, sent|wparam|optional, 1 }, + { EVENT_OBJECT_LOCATIONCHANGE, winevent_hook|wparam|lparam|winevent_hook_todo, 0, 0 }, + { EVENT_OBJECT_LOCATIONCHANGE, winevent_hook|wparam|lparam|optional, 0, 0 }, /* Win7 seems to send this twice. */ + { EVENT_SYSTEM_MINIMIZESTART, winevent_hook|wparam|lparam|winevent_hook_todo, 0, 0 }, { WM_CANCELMODE, sent }, + { EVENT_SYSTEM_CAPTUREEND, winevent_hook|wparam|lparam|winevent_hook_todo, 0, 0 }, { WM_CAPTURECHANGED, sent|defwinproc }, + { EVENT_SYSTEM_MENUPOPUPEND, winevent_hook|wparam|lparam|winevent_hook_todo, OBJID_CLIENT, 0 }, { HCBT_DESTROYWND, hook }, + { EVENT_OBJECT_HIDE, winevent_hook|wparam|lparam|winevent_hook_todo, 0, 0 }, + { EVENT_OBJECT_DESTROY, winevent_hook|wparam|lparam|winevent_hook_todo, 0, 0 }, { WM_UNINITMENUPOPUP, sent|defwinproc|lparam, 0, 0 }, { WM_MENUSELECT, sent|defwinproc|wparam|lparam, 0xffff0000, 0 }, + { EVENT_SYSTEM_MENUEND, winevent_hook|wparam|lparam|winevent_hook_todo, 0, 0 }, { WM_EXITMENULOOP, sent|defwinproc|wparam|lparam, 1, 0 }, { WM_NCACTIVATE, sent }, { WM_GETTEXT, sent|defwinproc|optional }, @@ -2169,17 +2186,29 @@ static const struct message WmTrackPopupMenuMinimizeWindow[] = {
static const struct message WmTrackPopupMenu[] = { { HCBT_CREATEWND, hook }, + { EVENT_OBJECT_CREATE, winevent_hook|wparam|lparam|winevent_hook_todo, 0, 0 }, { WM_ENTERMENULOOP, sent|wparam|lparam, TRUE, 0 }, + { EVENT_SYSTEM_CAPTURESTART, winevent_hook|wparam|lparam|winevent_hook_todo, 0, 0 }, { WM_INITMENU, sent|lparam, 0, 0 }, + { EVENT_SYSTEM_MENUSTART, winevent_hook|wparam|lparam|winevent_hook_todo, 0, 0 }, { WM_INITMENUPOPUP, sent|lparam, 0, 0 }, { 0x0093, sent|optional }, { 0x0094, sent|optional }, { 0x0094, sent|optional }, + { EVENT_OBJECT_LOCATIONCHANGE, winevent_hook|wparam|lparam|winevent_hook_todo, 0, 0 }, + { EVENT_OBJECT_SHOW, winevent_hook|wparam|lparam|winevent_hook_todo, 0, 0 }, + { EVENT_OBJECT_LOCATIONCHANGE, winevent_hook|wparam|lparam|optional, 0, 0 }, + { EVENT_SYSTEM_MENUPOPUPSTART, winevent_hook|wparam|lparam|winevent_hook_todo, OBJID_CLIENT, 0 }, { WM_ENTERIDLE, sent|wparam, 2 }, + { EVENT_SYSTEM_CAPTUREEND, winevent_hook|wparam|lparam|winevent_hook_todo, 0, 0 }, { WM_CAPTURECHANGED, sent }, + { EVENT_SYSTEM_MENUPOPUPEND, winevent_hook|wparam|lparam|winevent_hook_todo, OBJID_CLIENT, 0 }, { HCBT_DESTROYWND, hook }, + { EVENT_OBJECT_HIDE, winevent_hook|wparam|lparam|winevent_hook_todo, 0, 0 }, + { EVENT_OBJECT_DESTROY, winevent_hook|wparam|lparam|winevent_hook_todo, 0, 0 }, { WM_UNINITMENUPOPUP, sent|lparam, 0, 0 }, { WM_MENUSELECT, sent|wparam|lparam, 0xffff0000, 0 }, + { EVENT_SYSTEM_MENUEND, winevent_hook|wparam|lparam|winevent_hook_todo, 0, 0 }, { WM_EXITMENULOOP, sent|wparam|lparam, 1, 0 }, { 0 } }; @@ -2190,18 +2219,31 @@ static const struct message WmTrackPopupMenuEsc[] = {
static const struct message WmTrackPopupMenuCapture[] = { { HCBT_CREATEWND, hook }, + { EVENT_OBJECT_CREATE, winevent_hook|wparam|lparam|winevent_hook_todo, 0, 0 }, { WM_ENTERMENULOOP, sent|wparam|lparam, TRUE, 0 }, + { EVENT_SYSTEM_CAPTUREEND, winevent_hook|wparam|lparam|winevent_hook_todo, 0, 0 }, + { EVENT_SYSTEM_CAPTURESTART, winevent_hook|wparam|lparam|winevent_hook_todo, 0, 0 }, { WM_CAPTURECHANGED, sent }, { WM_INITMENU, sent|lparam, 0, 0 }, + { EVENT_SYSTEM_MENUSTART, winevent_hook|wparam|lparam|winevent_hook_todo, 0, 0 }, { WM_INITMENUPOPUP, sent|lparam, 0, 0 }, { 0x0093, sent|optional }, { 0x0094, sent|optional }, { 0x0094, sent|optional }, + { EVENT_OBJECT_LOCATIONCHANGE, winevent_hook|wparam|lparam|winevent_hook_todo, 0, 0 }, + { EVENT_OBJECT_SHOW, winevent_hook|wparam|lparam|winevent_hook_todo, 0, 0 }, + { EVENT_OBJECT_LOCATIONCHANGE, winevent_hook|wparam|lparam|optional, 0, 0 }, + { EVENT_SYSTEM_MENUPOPUPSTART, winevent_hook|wparam|lparam|winevent_hook_todo, OBJID_CLIENT, 0 }, { WM_ENTERIDLE, sent|wparam, 2 }, + { EVENT_SYSTEM_CAPTUREEND, winevent_hook|wparam|lparam|winevent_hook_todo, 0, 0 }, { WM_CAPTURECHANGED, sent }, + { EVENT_SYSTEM_MENUPOPUPEND, winevent_hook|wparam|lparam|winevent_hook_todo, OBJID_CLIENT, 0 }, { HCBT_DESTROYWND, hook }, + { EVENT_OBJECT_HIDE, winevent_hook|wparam|lparam|winevent_hook_todo, 0, 0 }, + { EVENT_OBJECT_DESTROY, winevent_hook|wparam|lparam|winevent_hook_todo, 0, 0 }, { WM_UNINITMENUPOPUP, sent|lparam, 0, 0 }, { WM_MENUSELECT, sent|wparam|lparam, 0xffff0000, 0 }, + { EVENT_SYSTEM_MENUEND, winevent_hook|wparam|lparam|winevent_hook_todo, 0, 0 }, { WM_EXITMENULOOP, sent|wparam|lparam, 1, 0 }, { 0 } }; @@ -2223,16 +2265,28 @@ static const struct message WmTrackPopupMenuEmpty[] = {
static const struct message WmTrackPopupMenuAbort[] = { { HCBT_CREATEWND, hook }, + { EVENT_OBJECT_CREATE, winevent_hook|wparam|lparam|winevent_hook_todo, 0, 0 }, { WM_ENTERMENULOOP, sent|wparam|lparam, TRUE, 0 }, + { EVENT_SYSTEM_CAPTURESTART, winevent_hook|wparam|lparam|winevent_hook_todo, 0, 0 }, { WM_INITMENU, sent|lparam, 0, 0 }, + { EVENT_SYSTEM_MENUSTART, winevent_hook|wparam|lparam|winevent_hook_todo, 0, 0 }, { WM_INITMENUPOPUP, sent|lparam, 0, 0 }, { 0x0093, sent|optional }, { 0x0094, sent|optional }, { 0x0094, sent|optional }, + { EVENT_OBJECT_LOCATIONCHANGE, winevent_hook|wparam|lparam|winevent_hook_todo, 0, 0 }, + { EVENT_OBJECT_SHOW, winevent_hook|wparam|lparam|winevent_hook_todo, 0, 0 }, + { EVENT_OBJECT_LOCATIONCHANGE, winevent_hook|wparam|lparam|optional, 0, 0 }, + { EVENT_SYSTEM_MENUPOPUPSTART, winevent_hook|wparam|lparam|winevent_hook_todo, OBJID_CLIENT, 0 }, + { EVENT_SYSTEM_CAPTUREEND, winevent_hook|wparam|lparam|winevent_hook_todo, 0, 0 }, { WM_CAPTURECHANGED, sent }, + { EVENT_SYSTEM_MENUPOPUPEND, winevent_hook|wparam|lparam|winevent_hook_todo, OBJID_CLIENT, 0 }, { HCBT_DESTROYWND, hook }, + { EVENT_OBJECT_HIDE, winevent_hook|wparam|lparam|winevent_hook_todo, 0, 0 }, + { EVENT_OBJECT_DESTROY, winevent_hook|wparam|lparam|winevent_hook_todo, 0, 0 }, { WM_UNINITMENUPOPUP, sent|lparam, 0, 0 }, { WM_MENUSELECT, sent|wparam|lparam, 0xffff0000, 0 }, + { EVENT_SYSTEM_MENUEND, winevent_hook|wparam|lparam|winevent_hook_todo, 0, 0 }, { WM_EXITMENULOOP, sent|wparam|lparam, 1, 0 }, { 0 } }; @@ -18690,6 +18744,7 @@ START_TEST(msg) test_keyflags(); test_hotkey(); test_layered_window(); + test_TrackPopupMenu();
/* Fix message sequences before removing 4 lines below */ if (pUnhookWinEvent && hEvent_hook) @@ -18700,7 +18755,6 @@ START_TEST(msg) } hEvent_hook = 0;
- test_TrackPopupMenu(); test_TrackPopupMenuEmpty(); test_DoubleSetCapture(); /* keep it the last test, under Windows it tends to break the tests