Signed-off-by: Connor McAdams cmcadams@codeweavers.com --- dlls/user32/tests/msg.c | 59 ++++++++++++++++++++++------------------- 1 file changed, 31 insertions(+), 28 deletions(-)
diff --git a/dlls/user32/tests/msg.c b/dlls/user32/tests/msg.c index 5035eea8a17..eebc9a112ea 100644 --- a/dlls/user32/tests/msg.c +++ b/dlls/user32/tests/msg.c @@ -11806,14 +11806,14 @@ static const struct message sl_edit_setfocus[] = { HCBT_SETFOCUS, hook }, { WM_IME_SETCONTEXT, sent|wparam|optional, 1 }, { WM_IME_NOTIFY, sent|wparam|defwinproc|optional, 2 }, - { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 }, + { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam|optional, OBJID_CLIENT, 0 }, { WM_SETFOCUS, sent|wparam, 0 }, { WM_IME_NOTIFY, sent|wparam|defwinproc|optional, 10 }, { WM_IME_NOTIFY, sent|wparam|defwinproc|optional, 15 }, { WM_CTLCOLOREDIT, sent|parent }, { WM_IME_NOTIFY, sent|wparam|defwinproc|optional, 11 }, - { EVENT_OBJECT_CREATE, winevent_hook|wparam|lparam, OBJID_CARET, 0 }, - { EVENT_OBJECT_SHOW, winevent_hook|wparam|lparam, OBJID_CARET, 0 }, + { EVENT_OBJECT_CREATE, winevent_hook|wparam|lparam|optional, OBJID_CARET, 0 }, + { EVENT_OBJECT_SHOW, winevent_hook|wparam|lparam|optional, OBJID_CARET, 0 }, { WM_COMMAND, sent|parent|wparam, MAKEWPARAM(ID_EDIT, EN_SETFOCUS) }, { 0 } }; @@ -11822,9 +11822,12 @@ static const struct message sl_edit_invisible[] = { HCBT_SETFOCUS, hook }, { WM_IME_SETCONTEXT, sent|wparam|optional, 1 }, { WM_IME_NOTIFY, sent|wparam|defwinproc|optional, 2 }, - { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 }, + { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam|optional, OBJID_CLIENT, 0 }, { WM_KILLFOCUS, sent|parent }, + { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam|optional, OBJID_CLIENT, 0 }, { WM_SETFOCUS, sent }, + { EVENT_OBJECT_CREATE, winevent_hook|wparam|lparam|optional, OBJID_CARET, 0 }, + { EVENT_OBJECT_SHOW, winevent_hook|wparam|lparam|optional, OBJID_CARET, 0 }, { WM_COMMAND, sent|parent|wparam, MAKEWPARAM(ID_EDIT, EN_SETFOCUS) }, { 0 } }; @@ -11833,22 +11836,22 @@ static const struct message ml_edit_setfocus[] = { HCBT_SETFOCUS, hook }, { WM_IME_SETCONTEXT, sent|wparam|optional, 1 }, { WM_IME_NOTIFY, sent|wparam|defwinproc|optional, 2 }, - { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 }, + { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam|optional, OBJID_CLIENT, 0 }, { WM_SETFOCUS, sent|wparam, 0 }, { WM_IME_NOTIFY, sent|wparam|defwinproc|optional, 10 }, { WM_IME_NOTIFY, sent|wparam|defwinproc|optional, 11 }, - { EVENT_OBJECT_CREATE, winevent_hook|wparam|lparam, OBJID_CARET, 0 }, - { EVENT_OBJECT_SHOW, winevent_hook|wparam|lparam, OBJID_CARET, 0 }, + { EVENT_OBJECT_CREATE, winevent_hook|wparam|lparam|optional, OBJID_CARET, 0 }, + { EVENT_OBJECT_SHOW, winevent_hook|wparam|lparam|optional, OBJID_CARET, 0 }, { WM_COMMAND, sent|parent|wparam, MAKEWPARAM(ID_EDIT, EN_SETFOCUS) }, { 0 } }; static const struct message sl_edit_killfocus[] = { { HCBT_SETFOCUS, hook }, - { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 }, + { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam|optional, OBJID_CLIENT, 0 }, { WM_KILLFOCUS, sent|wparam, 0 }, - { EVENT_OBJECT_HIDE, winevent_hook|wparam|lparam, OBJID_CARET, 0 }, - { EVENT_OBJECT_DESTROY, winevent_hook|wparam|lparam, OBJID_CARET, 0 }, + { EVENT_OBJECT_HIDE, winevent_hook|wparam|lparam|optional, OBJID_CARET, 0 }, + { EVENT_OBJECT_DESTROY, winevent_hook|wparam|lparam|optional, OBJID_CARET, 0 }, { WM_COMMAND, sent|parent|wparam, MAKEWPARAM(ID_EDIT, EN_KILLFOCUS) }, { WM_IME_SETCONTEXT, sent|wparam|optional, 0 }, { WM_IME_NOTIFY, sent|wparam|defwinproc|optional, 1 }, @@ -11857,7 +11860,7 @@ static const struct message sl_edit_killfocus[] = static const struct message sl_edit_lbutton_dblclk[] = { { WM_LBUTTONDBLCLK, sent }, - { EVENT_SYSTEM_CAPTURESTART, winevent_hook|wparam|lparam, 0, 0 }, + { EVENT_SYSTEM_CAPTURESTART, winevent_hook|wparam|lparam|optional, 0, 0 }, { 0 } }; static const struct message sl_edit_lbutton_down[] = @@ -11866,52 +11869,52 @@ static const struct message sl_edit_lbutton_down[] = { HCBT_SETFOCUS, hook }, { WM_IME_SETCONTEXT, sent|wparam|defwinproc|optional, 1 }, { WM_IME_NOTIFY, sent|wparam|defwinproc|optional, 2 }, - { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 }, + { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam|optional, OBJID_CLIENT, 0 }, { WM_SETFOCUS, sent|wparam|defwinproc, 0 }, { WM_IME_NOTIFY, sent|wparam|defwinproc|optional, 10 }, { WM_CTLCOLOREDIT, sent|parent }, { WM_IME_NOTIFY, sent|wparam|defwinproc|optional, 11 }, - { EVENT_OBJECT_CREATE, winevent_hook|wparam|lparam, OBJID_CARET, 0 }, - { EVENT_OBJECT_LOCATIONCHANGE, winevent_hook|wparam|lparam, OBJID_CARET, 0 }, - { EVENT_OBJECT_SHOW, winevent_hook|wparam|lparam, OBJID_CARET, 0 }, + { EVENT_OBJECT_CREATE, winevent_hook|wparam|lparam|optional, OBJID_CARET, 0 }, + { EVENT_OBJECT_LOCATIONCHANGE, winevent_hook|wparam|lparam|optional, OBJID_CARET, 0 }, + { EVENT_OBJECT_SHOW, winevent_hook|wparam|lparam|optional, OBJID_CARET, 0 }, { WM_COMMAND, sent|parent|wparam, MAKEWPARAM(ID_EDIT, EN_SETFOCUS) }, - { EVENT_SYSTEM_CAPTURESTART, winevent_hook|wparam|lparam, 0, 0 }, - { EVENT_OBJECT_HIDE, winevent_hook|wparam|lparam, OBJID_CARET, 0 }, + { EVENT_SYSTEM_CAPTURESTART, winevent_hook|wparam|lparam|optional, 0, 0 }, + { EVENT_OBJECT_HIDE, winevent_hook|wparam|lparam|optional, OBJID_CARET, 0 }, { WM_CTLCOLOREDIT, sent|parent|optional }, { WM_IME_NOTIFY, sent|wparam|defwinproc|optional, 11 }, - { EVENT_OBJECT_LOCATIONCHANGE, winevent_hook|wparam|lparam, OBJID_CARET, 0 }, - { EVENT_OBJECT_SHOW, winevent_hook|wparam|lparam, OBJID_CARET, 0 }, + { EVENT_OBJECT_LOCATIONCHANGE, winevent_hook|wparam|lparam|optional, OBJID_CARET, 0 }, + { EVENT_OBJECT_SHOW, winevent_hook|wparam|lparam|optional, OBJID_CARET, 0 }, { 0 } }; static const struct message ml_edit_lbutton_down[] = { { WM_LBUTTONDOWN, sent|wparam|lparam, 0, 0 }, - { EVENT_SYSTEM_CAPTURESTART, winevent_hook|wparam|lparam, 0, 0 }, + { EVENT_SYSTEM_CAPTURESTART, winevent_hook|wparam|lparam|optional, 0, 0 }, { HCBT_SETFOCUS, hook }, { WM_IME_SETCONTEXT, sent|wparam|defwinproc|optional, 1 }, { WM_IME_NOTIFY, sent|wparam|defwinproc|optional, 2 }, - { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 }, + { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam|optional, OBJID_CLIENT, 0 }, { WM_SETFOCUS, sent|wparam|defwinproc, 0 }, { WM_IME_NOTIFY, sent|wparam|defwinproc|optional, 10 }, { WM_IME_NOTIFY, sent|wparam|defwinproc|optional, 11 }, - { EVENT_OBJECT_CREATE, winevent_hook|wparam|lparam, OBJID_CARET, 0 }, - { EVENT_OBJECT_SHOW, winevent_hook|wparam|lparam, OBJID_CARET, 0 }, + { EVENT_OBJECT_CREATE, winevent_hook|wparam|lparam|optional, OBJID_CARET, 0 }, + { EVENT_OBJECT_SHOW, winevent_hook|wparam|lparam|optional, OBJID_CARET, 0 }, { WM_COMMAND, sent|parent|wparam, MAKEWPARAM(ID_EDIT, EN_SETFOCUS) }, { 0 } }; static const struct message sl_edit_lbutton_up[] = { { WM_LBUTTONUP, sent|wparam|lparam, 0, 0 }, - { EVENT_OBJECT_HIDE, winevent_hook|wparam|lparam, OBJID_CARET, 0 }, - { EVENT_SYSTEM_CAPTUREEND, winevent_hook|wparam|lparam, 0, 0 }, + { EVENT_OBJECT_HIDE, winevent_hook|wparam|lparam|optional, OBJID_CARET, 0 }, + { EVENT_SYSTEM_CAPTUREEND, winevent_hook|wparam|lparam|optional, 0, 0 }, { WM_CAPTURECHANGED, sent|defwinproc }, - { EVENT_OBJECT_SHOW, winevent_hook|wparam|lparam, OBJID_CARET, 0 }, + { EVENT_OBJECT_SHOW, winevent_hook|wparam|lparam|optional, OBJID_CARET, 0 }, { 0 } }; static const struct message ml_edit_lbutton_up[] = { { WM_LBUTTONUP, sent|wparam|lparam, 0, 0 }, - { EVENT_SYSTEM_CAPTUREEND, winevent_hook|wparam|lparam, 0, 0 }, + { EVENT_SYSTEM_CAPTUREEND, winevent_hook|wparam|lparam|optional, 0, 0 }, { WM_CAPTURECHANGED, sent|defwinproc }, { 0 } }; @@ -18488,6 +18491,7 @@ START_TEST(msg) test_DestroyWindow(); test_DispatchMessage(); test_SendMessageTimeout(); + test_edit_messages();
/* Fix message sequences before removing 4 lines below */ if (pUnhookWinEvent && hEvent_hook) @@ -18498,7 +18502,6 @@ START_TEST(msg) } hEvent_hook = 0;
- test_edit_messages(); test_quit_message(); test_notify_message(); test_SetActiveWindow();