Signed-off-by: Connor McAdams cmcadams@codeweavers.com --- dlls/user32/tests/msg.c | 52 +++++++++++++++++++++++++++++++++++++++-- 1 file changed, 50 insertions(+), 2 deletions(-)
diff --git a/dlls/user32/tests/msg.c b/dlls/user32/tests/msg.c index e552c7452dc..53dc7a58cf2 100644 --- a/dlls/user32/tests/msg.c +++ b/dlls/user32/tests/msg.c @@ -15501,11 +15501,21 @@ static const struct message wm_popup_menu_1[] = { WM_MENUSELECT, sent|wparam, MAKEWPARAM(1,MF_HILITE|MF_POPUP) }, { WM_INITMENUPOPUP, sent|lparam, 0, 1 }, { HCBT_CREATEWND, hook|optional }, /* Win9x doesn't create a window */ + { EVENT_OBJECT_CREATE, winevent_hook|wparam|lparam|optional, 0, 0 }, + { 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_MENUSELECT, sent|wparam, MAKEWPARAM(200,MF_HILITE) }, + { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam|optional, OBJID_CLIENT, 1 }, { HCBT_KEYSKIPPED, hook|wparam|lparam|optional, 'E', 0xf0000001 }, { HCBT_KEYSKIPPED, hook|wparam|lparam|optional, VK_MENU, 0xd0000001 }, { HCBT_KEYSKIPPED, hook|wparam|lparam|optional, VK_RETURN, 0x10000001, 0, 0x40000000 }, + { EVENT_OBJECT_INVOKED, winevent_hook|wparam|lparam|optional, OBJID_MENU, 0 }, + { EVENT_SYSTEM_MENUPOPUPEND, winevent_hook|wparam|lparam|optional, OBJID_CLIENT, 0 }, { HCBT_DESTROYWND, hook|optional }, /* Win9x doesn't create a window */ + { 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, MAKEWPARAM(0,0xffff), 0 }, { WM_EXITMENULOOP, sent|wparam|lparam, 0, 0 }, @@ -15529,19 +15539,38 @@ static const struct message wm_popup_menu_2[] = { WM_MENUSELECT, sent|wparam|optional, MAKEWPARAM(0,MF_HILITE|MF_POPUP) }, /* Win9x */ { WM_INITMENUPOPUP, sent|lparam|optional, 0, 0 }, /* Win9x */ { HCBT_CREATEWND, hook }, + { EVENT_OBJECT_CREATE, winevent_hook|wparam|lparam|optional, 0, 0 }, + { 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_MENUSELECT, sent }, /*|wparam, MAKEWPARAM(0,MF_HILITE|MF_POPUP) - XP |wparam, MAKEWPARAM(100,MF_HILITE) - Win9x */ + { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam|optional, OBJID_CLIENT, 1 }, { HCBT_KEYSKIPPED, hook|wparam|lparam|optional, 'F', 0xf0000001 }, { HCBT_KEYSKIPPED, hook|wparam|lparam|optional, VK_MENU, 0xd0000001 }, { HCBT_KEYSKIPPED, hook|wparam|lparam|optional, VK_RIGHT, 0x10000001 }, { WM_INITMENUPOPUP, sent|lparam|optional, 0, 0 }, /* Win9x doesn't send it */ { HCBT_CREATEWND, hook|optional }, /* Win9x doesn't send it */ + { EVENT_OBJECT_CREATE, winevent_hook|wparam|lparam|optional, 0, 0 }, + { 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_MENUSELECT, sent|wparam|optional, MAKEWPARAM(100,MF_HILITE) }, + { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam|optional, OBJID_CLIENT, 1 }, { HCBT_KEYSKIPPED, hook|wparam|lparam|optional, VK_RIGHT, 0xd0000001 }, { HCBT_KEYSKIPPED, hook|wparam|lparam|optional, VK_RETURN, 0x10000001 }, + { EVENT_OBJECT_INVOKED, winevent_hook|wparam|lparam|optional, OBJID_MENU, 0 }, + { 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 }, + { EVENT_SYSTEM_MENUPOPUPEND, winevent_hook|wparam|lparam|optional, OBJID_CLIENT, 0 }, { HCBT_DESTROYWND, hook|optional }, /* Win9x doesn't send it */ + { 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, MAKEWPARAM(0,0xffff), 0 }, { WM_EXITMENULOOP, sent|wparam|lparam, 0, 0 }, @@ -15565,19 +15594,38 @@ static const struct message wm_popup_menu_3[] = { WM_MENUSELECT, sent|wparam|optional, MAKEWPARAM(0,MF_HILITE|MF_POPUP) }, /* Win9x */ { WM_INITMENUPOPUP, sent|lparam|optional, 0, 0 }, /* Win9x */ { HCBT_CREATEWND, hook }, + { EVENT_OBJECT_CREATE, winevent_hook|wparam|lparam|optional, 0, 0 }, + { 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_MENUSELECT, sent }, /*|wparam, MAKEWPARAM(0,MF_HILITE|MF_POPUP) - XP |wparam, MAKEWPARAM(100,MF_HILITE) - Win9x */ + { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam|optional, OBJID_CLIENT, 1 }, { HCBT_KEYSKIPPED, hook|wparam|lparam|optional, 'F', 0xf0000001 }, { HCBT_KEYSKIPPED, hook|wparam|lparam|optional, VK_MENU, 0xd0000001 }, { HCBT_KEYSKIPPED, hook|wparam|lparam|optional, VK_RIGHT, 0x10000001 }, { WM_INITMENUPOPUP, sent|lparam|optional, 0, 0 }, /* Win9x doesn't send it */ { HCBT_CREATEWND, hook|optional }, /* Win9x doesn't send it */ + { EVENT_OBJECT_CREATE, winevent_hook|wparam|lparam|optional, 0, 0 }, + { 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_MENUSELECT, sent|wparam|optional, MAKEWPARAM(100,MF_HILITE) }, + { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam|optional, OBJID_CLIENT, 1 }, { HCBT_KEYSKIPPED, hook|wparam|lparam|optional, VK_RIGHT, 0xd0000001 }, { HCBT_KEYSKIPPED, hook|wparam|lparam|optional, VK_RETURN, 0x10000001 }, + { EVENT_OBJECT_INVOKED, winevent_hook|wparam|lparam|optional, OBJID_MENU, 100 }, + { 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 }, + { EVENT_SYSTEM_MENUPOPUPEND, winevent_hook|wparam|lparam|optional, OBJID_CLIENT, 0 }, { HCBT_DESTROYWND, hook|optional }, /* Win9x doesn't send it */ + { 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, MAKEWPARAM(0,0xffff), 0 }, { WM_EXITMENULOOP, sent|wparam|lparam, 0, 0 }, @@ -18538,6 +18586,8 @@ START_TEST(msg) test_nullCallback(); test_dbcs_wm_char(); test_unicode_wm_char(); + test_menu_messages(); + test_paintingloop();
/* Fix message sequences before removing 4 lines below */ if (pUnhookWinEvent && hEvent_hook) @@ -18548,8 +18598,6 @@ START_TEST(msg) } hEvent_hook = 0;
- test_menu_messages(); - test_paintingloop(); test_defwinproc(); test_desktop_winproc(); test_clipboard_viewers();