Signed-off-by: Connor McAdams cmcadams@codeweavers.com --- dlls/user32/tests/msg.c | 64 +++++++++++++++++++++++++++++++++++++++-- 1 file changed, 62 insertions(+), 2 deletions(-)
diff --git a/dlls/user32/tests/msg.c b/dlls/user32/tests/msg.c index b206ac919af..21505557815 100644 --- a/dlls/user32/tests/msg.c +++ b/dlls/user32/tests/msg.c @@ -2118,30 +2118,46 @@ static const struct message WmSHOWNATopInvisible[] = {
static const struct message WmTrackPopupMenuMinimizeWindow[] = { { HCBT_CREATEWND, hook }, + { EVENT_OBJECT_CREATE, winevent_hook|wparam|lparam|optional, 0, 0 }, { WM_ENTERMENULOOP, sent|wparam|lparam, TRUE, 0 }, + { EVENT_SYSTEM_CAPTURESTART, winevent_hook|wparam|lparam|optional, 0, 0 }, { WM_INITMENU, sent|lparam, 0, 0 }, + { EVENT_SYSTEM_MENUSTART, winevent_hook|wparam|lparam|optional, 0, 0 }, { WM_INITMENUPOPUP, sent|lparam, 0, 0 }, { 0x0093, sent|optional }, { 0x0094, sent|optional }, { 0x0094, sent|optional }, + { EVENT_OBJECT_LOCATIONCHANGE, winevent_hook|wparam|lparam|optional, 0, 0 }, + { EVENT_OBJECT_SHOW, winevent_hook|wparam|lparam|optional, 0, 0 }, + { EVENT_OBJECT_LOCATIONCHANGE, winevent_hook|wparam|lparam|optional, 0, 0 }, + { EVENT_SYSTEM_MENUPOPUPSTART, winevent_hook|wparam|lparam|optional, OBJID_CLIENT, 0 }, { WM_ENTERIDLE, sent|wparam, 2 }, { HCBT_MINMAX, hook }, { HCBT_SETFOCUS, hook }, + { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam|optional, 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|optional, 0, 0 }, { WM_WINDOWPOSCHANGED, sent }, { WM_MOVE, sent|defwinproc }, { WM_SIZE, sent|defwinproc }, + { EVENT_OBJECT_LOCATIONCHANGE, winevent_hook|wparam|lparam|optional, 0, 0 }, + { EVENT_SYSTEM_MINIMIZESTART, winevent_hook|wparam|lparam|optional, 0, 0 }, { WM_GETTEXT, sent|optional }, { WM_NCCALCSIZE, sent|wparam|optional, 1 }, { WM_CANCELMODE, sent }, + { EVENT_SYSTEM_CAPTUREEND, winevent_hook|wparam|lparam|optional, 0, 0 }, { WM_CAPTURECHANGED, sent|defwinproc }, + { EVENT_SYSTEM_MENUPOPUPEND, winevent_hook|wparam|lparam|optional, OBJID_CLIENT, 0 }, { HCBT_DESTROYWND, hook }, + { EVENT_OBJECT_HIDE, winevent_hook|wparam|lparam|optional, 0, 0 }, + { EVENT_OBJECT_DESTROY, winevent_hook|wparam|lparam|optional, 0, 0 }, { WM_UNINITMENUPOPUP, sent|defwinproc|lparam, 0, 0 }, { WM_MENUSELECT, sent|defwinproc|wparam|lparam, 0xffff0000, 0 }, + { EVENT_SYSTEM_MENUEND, winevent_hook|wparam|lparam|optional, 0, 0 }, { WM_EXITMENULOOP, sent|defwinproc|wparam|lparam, 1, 0 }, { WM_NCACTIVATE, sent }, { WM_GETTEXT, sent|defwinproc|optional }, @@ -2153,17 +2169,29 @@ static const struct message WmTrackPopupMenuMinimizeWindow[] = {
static const struct message WmTrackPopupMenu[] = { { HCBT_CREATEWND, hook }, + { EVENT_OBJECT_CREATE, winevent_hook|wparam|lparam|optional, 0, 0 }, { WM_ENTERMENULOOP, sent|wparam|lparam, TRUE, 0 }, + { EVENT_SYSTEM_CAPTURESTART, winevent_hook|wparam|lparam|optional, 0, 0 }, { WM_INITMENU, sent|lparam, 0, 0 }, + { EVENT_SYSTEM_MENUSTART, winevent_hook|wparam|lparam|optional, 0, 0 }, { WM_INITMENUPOPUP, sent|lparam, 0, 0 }, { 0x0093, sent|optional }, { 0x0094, sent|optional }, { 0x0094, sent|optional }, + { EVENT_OBJECT_LOCATIONCHANGE, winevent_hook|wparam|lparam|optional, 0, 0 }, + { EVENT_OBJECT_SHOW, winevent_hook|wparam|lparam|optional, 0, 0 }, + { EVENT_OBJECT_LOCATIONCHANGE, winevent_hook|wparam|lparam|optional, 0, 0 }, + { EVENT_SYSTEM_MENUPOPUPSTART, winevent_hook|wparam|lparam|optional, OBJID_CLIENT, 0 }, { WM_ENTERIDLE, sent|wparam, 2 }, + { EVENT_SYSTEM_CAPTUREEND, winevent_hook|wparam|lparam|optional, 0, 0 }, { WM_CAPTURECHANGED, sent }, + { EVENT_SYSTEM_MENUPOPUPEND, winevent_hook|wparam|lparam|optional, OBJID_CLIENT, 0 }, { HCBT_DESTROYWND, hook }, + { EVENT_OBJECT_HIDE, winevent_hook|wparam|lparam|optional, 0, 0 }, + { EVENT_OBJECT_DESTROY, winevent_hook|wparam|lparam|optional, 0, 0 }, { WM_UNINITMENUPOPUP, sent|lparam, 0, 0 }, { WM_MENUSELECT, sent|wparam|lparam, 0xffff0000, 0 }, + { EVENT_SYSTEM_MENUEND, winevent_hook|wparam|lparam|optional, 0, 0 }, { WM_EXITMENULOOP, sent|wparam|lparam, 1, 0 }, { 0 } }; @@ -2174,49 +2202,81 @@ static const struct message WmTrackPopupMenuEsc[] = {
static const struct message WmTrackPopupMenuCapture[] = { { HCBT_CREATEWND, hook }, + { EVENT_OBJECT_CREATE, winevent_hook|wparam|lparam|optional, 0, 0 }, { WM_ENTERMENULOOP, sent|wparam|lparam, TRUE, 0 }, + { EVENT_SYSTEM_CAPTUREEND, winevent_hook|wparam|lparam|optional, 0, 0 }, + { EVENT_SYSTEM_CAPTURESTART, winevent_hook|wparam|lparam|optional, 0, 0 }, { WM_CAPTURECHANGED, sent }, { WM_INITMENU, sent|lparam, 0, 0 }, + { EVENT_SYSTEM_MENUSTART, winevent_hook|wparam|lparam|optional, 0, 0 }, { WM_INITMENUPOPUP, sent|lparam, 0, 0 }, { 0x0093, sent|optional }, { 0x0094, sent|optional }, { 0x0094, sent|optional }, + { EVENT_OBJECT_LOCATIONCHANGE, winevent_hook|wparam|lparam|optional, 0, 0 }, + { EVENT_OBJECT_SHOW, winevent_hook|wparam|lparam|optional, 0, 0 }, + { EVENT_OBJECT_LOCATIONCHANGE, winevent_hook|wparam|lparam|optional, 0, 0 }, + { EVENT_SYSTEM_MENUPOPUPSTART, winevent_hook|wparam|lparam|optional, OBJID_CLIENT, 0 }, { WM_ENTERIDLE, sent|wparam, 2 }, + { EVENT_SYSTEM_CAPTUREEND, winevent_hook|wparam|lparam|optional, 0, 0 }, { WM_CAPTURECHANGED, sent }, + { EVENT_SYSTEM_MENUPOPUPEND, winevent_hook|wparam|lparam|optional, OBJID_CLIENT, 0 }, { HCBT_DESTROYWND, hook }, + { EVENT_OBJECT_HIDE, winevent_hook|wparam|lparam|optional, 0, 0 }, + { EVENT_OBJECT_DESTROY, winevent_hook|wparam|lparam|optional, 0, 0 }, { WM_UNINITMENUPOPUP, sent|lparam, 0, 0 }, { WM_MENUSELECT, sent|wparam|lparam, 0xffff0000, 0 }, + { EVENT_SYSTEM_MENUEND, winevent_hook|wparam|lparam|optional, 0, 0 }, { WM_EXITMENULOOP, sent|wparam|lparam, 1, 0 }, { 0 } };
static const struct message WmTrackPopupMenuEmpty[] = { { HCBT_CREATEWND, hook }, + { EVENT_OBJECT_CREATE, winevent_hook|wparam|lparam|optional, 0, 0 }, { WM_ENTERMENULOOP, sent|wparam|lparam, TRUE, 0 }, + { EVENT_SYSTEM_CAPTURESTART, winevent_hook|wparam|lparam|optional, 0, 0 }, { WM_INITMENU, sent|lparam, 0, 0 }, + { EVENT_SYSTEM_MENUSTART, winevent_hook|wparam|lparam|optional, 0, 0 }, { WM_INITMENUPOPUP, sent|lparam, 0, 0 }, { 0x0093, sent|optional }, { 0x0094, sent|optional }, { 0x0094, sent|optional }, + { EVENT_OBJECT_LOCATIONCHANGE, winevent_hook|wparam|lparam|optional, 0, 0 }, + { EVENT_SYSTEM_MENUEND, winevent_hook|wparam|lparam|optional, 0, 0 }, + { EVENT_SYSTEM_CAPTUREEND, winevent_hook|wparam|lparam|optional, 0, 0 }, { WM_CAPTURECHANGED, sent }, { WM_EXITMENULOOP, sent|wparam|lparam, 1, 0 }, { HCBT_DESTROYWND, hook }, + { EVENT_OBJECT_DESTROY, winevent_hook|wparam|lparam|optional, 0, 0 }, { WM_UNINITMENUPOPUP, sent|lparam, 0, 0 }, { 0 } };
static const struct message WmTrackPopupMenuAbort[] = { { HCBT_CREATEWND, hook }, + { EVENT_OBJECT_CREATE, winevent_hook|wparam|lparam|optional, 0, 0 }, { WM_ENTERMENULOOP, sent|wparam|lparam, TRUE, 0 }, + { EVENT_SYSTEM_CAPTURESTART, winevent_hook|wparam|lparam|optional, 0, 0 }, { WM_INITMENU, sent|lparam, 0, 0 }, + { EVENT_SYSTEM_MENUSTART, winevent_hook|wparam|lparam|optional, 0, 0 }, { WM_INITMENUPOPUP, sent|lparam, 0, 0 }, { 0x0093, sent|optional }, { 0x0094, sent|optional }, { 0x0094, sent|optional }, + { EVENT_OBJECT_LOCATIONCHANGE, winevent_hook|wparam|lparam|optional, 0, 0 }, + { EVENT_OBJECT_SHOW, winevent_hook|wparam|lparam|optional, 0, 0 }, + { EVENT_OBJECT_LOCATIONCHANGE, winevent_hook|wparam|lparam|optional, 0, 0 }, + { EVENT_SYSTEM_MENUPOPUPSTART, winevent_hook|wparam|lparam|optional, OBJID_CLIENT, 0 }, + { EVENT_SYSTEM_CAPTUREEND, winevent_hook|wparam|lparam|optional, 0, 0 }, { WM_CAPTURECHANGED, sent }, + { EVENT_SYSTEM_MENUPOPUPEND, winevent_hook|wparam|lparam|optional, OBJID_CLIENT, 0 }, { HCBT_DESTROYWND, hook }, + { EVENT_OBJECT_HIDE, winevent_hook|wparam|lparam|optional, 0, 0 }, + { EVENT_OBJECT_DESTROY, winevent_hook|wparam|lparam|optional, 0, 0 }, { WM_UNINITMENUPOPUP, sent|lparam, 0, 0 }, { WM_MENUSELECT, sent|wparam|lparam, 0xffff0000, 0 }, + { EVENT_SYSTEM_MENUEND, winevent_hook|wparam|lparam|optional, 0, 0 }, { WM_EXITMENULOOP, sent|wparam|lparam, 1, 0 }, { 0 } }; @@ -18609,6 +18669,8 @@ START_TEST(msg) test_keyflags(); test_hotkey(); test_layered_window(); + test_TrackPopupMenu(); + test_TrackPopupMenuEmpty();
/* Fix message sequences before removing 4 lines below */ if (pUnhookWinEvent && hEvent_hook) @@ -18619,8 +18681,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 * which rely on active/foreground windows being correct.