This adds some wine-only messages, but most of those are cases that follow an existing EVENT_SYSTEM_FOREGROUND wine-only message, so likely correctly reflecting a thing Wine is already known to do wrong.
The exception is WmRestore_3. https://testbot.winehq.org/JobDetails.pl?Key=146025 suggests that's also a case where focuses the window and shouldn't.
From: Esme Povirk esme@codeweavers.com
--- dlls/user32/tests/msg.c | 67 +++++++++++++++++++++++------------------ dlls/win32u/input.c | 3 +- 2 files changed, 38 insertions(+), 32 deletions(-)
diff --git a/dlls/user32/tests/msg.c b/dlls/user32/tests/msg.c index 1a264268e8c..f05155c407d 100644 --- a/dlls/user32/tests/msg.c +++ b/dlls/user32/tests/msg.c @@ -212,7 +212,7 @@ static const struct message WmSWP_ShowOverlappedSeq[] = { { 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|msg_todo, OBJID_CLIENT, 0 }, + { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 }, { WM_SETFOCUS, sent|wparam|defwinproc, 0 }, { WM_GETTEXT, sent|optional }, { WM_NCPAINT, sent|wparam|optional, 1 }, @@ -763,7 +763,7 @@ static const struct message WmCreateMaxPopupSeq[] = { { 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|msg_todo, OBJID_CLIENT, 0 }, + { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 }, { WM_SETFOCUS, sent|wparam|defwinproc, 0 }, { WM_GETTEXT, sent|optional }, { WM_SYNCPAINT, sent|wparam|optional, 4 }, @@ -813,7 +813,7 @@ static const struct message WmShowMaxPopupResizedSeq[] = { { 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|msg_todo, OBJID_CLIENT, 0 }, + { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 }, { WM_SETFOCUS, sent|wparam|defwinproc, 0 }, { WM_GETTEXT, sent|optional }, { WM_NCPAINT, sent|wparam|optional, 1 }, @@ -845,7 +845,7 @@ static const struct message WmShowMaxPopupSeq[] = { { 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|msg_todo, OBJID_CLIENT, 0 }, + { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 }, { WM_SETFOCUS, sent|wparam|defwinproc, 0 }, { WM_GETTEXT, sent|optional }, { WM_SYNCPAINT, sent|wparam|optional, 4 }, @@ -883,7 +883,7 @@ static const struct message WmCreatePopupSeq[] = { { 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|msg_todo, OBJID_CLIENT, 0 }, + { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 }, { WM_SETFOCUS, sent|wparam|defwinproc, 0 }, { WM_GETTEXT, sent|optional }, { WM_SYNCPAINT, sent|wparam|optional, 4 }, @@ -1157,7 +1157,7 @@ static const struct message WmShowPopupExtremeLocationSeq[] = { { WM_IME_NOTIFY, sent|wparam|defwinproc|optional, 2 }, { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam|optional, OBJID_CLIENT, 0 }, /* Not sent on Win10. */ { HCBT_SETFOCUS, hook }, - { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam|msg_todo, OBJID_CLIENT, 0 }, + { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 }, { WM_SETFOCUS, sent|defwinproc }, { WM_NCPAINT, sent|wparam|optional, 1 }, /* Not always sent on Win8+ */ { WM_ERASEBKGND, sent|optional }, /* Not always sent on Win8+ */ @@ -1192,7 +1192,7 @@ static const struct message WmShowPopupFirstDrawSeq_1[] = { { WM_IME_NOTIFY, sent|wparam|defwinproc|optional, 2 }, { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam|optional, OBJID_CLIENT, 0 }, /* Not sent on Win10. */ { HCBT_SETFOCUS, hook }, - { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam|msg_todo, OBJID_CLIENT, 0 }, + { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 }, { WM_SETFOCUS, sent|defwinproc }, { WM_NCPAINT, sent|wparam, 1 }, { WM_ERASEBKGND, sent }, @@ -1233,7 +1233,7 @@ static const struct message WmShowPopupFirstDrawSeq_2[] = { { WM_IME_NOTIFY, sent|wparam|defwinproc|optional, 2 }, { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam|optional, OBJID_CLIENT, 0 }, /* Not sent on Win10. */ { HCBT_SETFOCUS, hook }, - { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam|msg_todo, OBJID_CLIENT, 0 }, + { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 }, { WM_SETFOCUS, sent|defwinproc }, { WM_NCPAINT, sent|wparam, 1 }, { WM_ERASEBKGND, sent }, @@ -1269,7 +1269,7 @@ static const struct message WmFirstDrawSetWindowPosSeq1[] = { { WM_IME_NOTIFY, sent|wparam|defwinproc|optional, 2 }, { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam|optional, OBJID_CLIENT, 0 }, /* Not sent on Win10. */ { HCBT_SETFOCUS, hook }, - { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam|msg_todo, OBJID_CLIENT, 0 }, + { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 }, { WM_SETFOCUS, sent|defwinproc }, { WM_NCPAINT, sent|wparam, 1 }, { WM_ERASEBKGND, sent }, @@ -1300,7 +1300,7 @@ static const struct message WmFirstDrawSetWindowPosSeq2[] = { { WM_IME_NOTIFY, sent|wparam|defwinproc|optional, 2 }, { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam|optional, OBJID_CLIENT, 0 }, /* Not sent on Win10. */ { HCBT_SETFOCUS, hook }, - { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam|msg_todo, OBJID_CLIENT, 0 }, + { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 }, { WM_SETFOCUS, sent|defwinproc }, { WM_WINDOWPOSCHANGED, sent }, { WM_MOVE, sent|defwinproc }, @@ -1323,6 +1323,7 @@ static const struct message WmFirstDrawSetWindowPosSeq3[] = { { WM_NCACTIVATE, sent|wine_only }, { WM_ACTIVATE, sent|wine_only }, { HCBT_SETFOCUS, hook|wine_only }, + { EVENT_OBJECT_FOCUS, winevent_hook|lparam|wparam|wine_only, OBJID_CLIENT, 0 }, { WM_SETFOCUS, sent|defwinproc|wine_only }, { 0 } }; @@ -1348,7 +1349,7 @@ static const struct message WmFirstDrawSetWindowPosSeq4[] = { { WM_IME_NOTIFY, sent|wparam|defwinproc|optional, 2 }, { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam|optional, OBJID_CLIENT, 0 }, /* Not sent on Win10. */ { HCBT_SETFOCUS, hook }, - { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam|msg_todo, OBJID_CLIENT, 0 }, + { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 }, { WM_SETFOCUS, sent|defwinproc }, { WM_NCPAINT, sent|wparam, 1 }, { WM_ERASEBKGND, sent }, @@ -1377,7 +1378,7 @@ static const struct message WmFirstDrawSetWindowPosSeq5[] = { { WM_IME_NOTIFY, sent|wparam|defwinproc|optional, 2 }, { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam|optional, OBJID_CLIENT, 0 }, /* Not sent on Win10. */ { HCBT_SETFOCUS, hook }, - { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam|msg_todo, OBJID_CLIENT, 0 }, + { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 }, { WM_SETFOCUS, sent|defwinproc }, { WM_WINDOWPOSCHANGED, sent }, { 0 } @@ -2971,7 +2972,7 @@ static const struct message WmCreateMDIframeSeq[] = { { 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|msg_todo, OBJID_CLIENT, 0 }, + { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 }, { WM_SETFOCUS, sent|wparam|defwinproc, 0 }, /* Win9x adds SWP_NOZORDER below */ { WM_WINDOWPOSCHANGED, sent|wparam, SWP_SHOWWINDOW|SWP_NOSIZE|SWP_NOMOVE|SWP_NOCLIENTSIZE|SWP_NOCLIENTMOVE }, @@ -3077,7 +3078,7 @@ static const struct message WmCreateMDIchildVisibleSeq[] = { { HCBT_SETFOCUS, hook }, /* in MDI client */ { WM_IME_SETCONTEXT, sent|wparam|optional, 1 }, /* in MDI client */ { WM_IME_NOTIFY, sent|wparam|optional, 2 }, /* in MDI client */ - { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam|msg_todo, OBJID_CLIENT, 0 }, + { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 }, { WM_SETFOCUS, sent }, /* in MDI client */ { HCBT_SETFOCUS, hook }, { WM_KILLFOCUS, sent }, /* in MDI client */ @@ -3137,7 +3138,7 @@ static const struct message WmCreateMDIchildInvisibleParentSeq[] = { { HCBT_SETFOCUS, hook }, /* in MDI client */ { WM_IME_SETCONTEXT, sent|wparam|optional, 1 }, /* in MDI client */ { WM_IME_NOTIFY, sent|wparam|optional, 2 }, /* in MDI client */ - { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam|msg_todo, OBJID_CLIENT, 0 }, + { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 }, { WM_SETFOCUS, sent }, /* in MDI client */ { HCBT_SETFOCUS, hook }, { WM_KILLFOCUS, sent }, /* in MDI client */ @@ -3802,7 +3803,7 @@ static const struct message WmMaximizeMDIchildInvisibleSeq[] = { { WM_NCACTIVATE, sent|wparam|optional|defwinproc, 1 }, { HCBT_SETFOCUS, hook|optional }, { WM_IME_SETCONTEXT, sent|wparam|optional, 1 }, /* in MDI client */ - { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam|msg_todo, OBJID_CLIENT, 0 }, + { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 }, { WM_SETFOCUS, sent|optional }, /* in MDI client */ { HCBT_SETFOCUS, hook|optional }, { WM_KILLFOCUS, sent|optional }, /* in MDI client */ @@ -3835,7 +3836,7 @@ static const struct message WmMaximizeMDIchildInvisibleSeq2[] = { { WM_NCACTIVATE, sent|wparam|defwinproc|optional, 1 }, { HCBT_SETFOCUS, hook|optional }, { WM_IME_SETCONTEXT, sent|wparam|optional, 1 }, /* in MDI client */ - { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam|msg_todo, OBJID_CLIENT, 0 }, + { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 }, { WM_SETFOCUS, sent|optional }, /* in MDI client */ { HCBT_SETFOCUS, hook|optional }, { WM_KILLFOCUS, sent|optional }, /* in MDI client */ @@ -3969,7 +3970,7 @@ static const struct message WmRestoreMDIchildVisibleSeq_2[] = { { 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|msg_todo, OBJID_CLIENT, 0 }, + { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 }, { WM_SETFOCUS, sent }, { 0 } }; @@ -6359,7 +6360,7 @@ static const struct message WmSetFocusButtonSeq[] = { 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|msg_todo, OBJID_CLIENT, 0 }, + { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 }, { WM_SETFOCUS, sent|wparam, 0 }, { WM_CTLCOLORBTN, sent|parent }, { WM_COMMAND, sent|wparam|parent, MAKEWPARAM(ID_BUTTON, BN_SETFOCUS) }, @@ -6385,7 +6386,7 @@ static const struct message WmSetFocusStaticSeq[] = { 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|msg_todo, OBJID_CLIENT, 0 }, + { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 }, { WM_SETFOCUS, sent|wparam, 0 }, { WM_CTLCOLORSTATIC, sent|parent }, { WM_COMMAND, sent|wparam|parent, MAKEWPARAM(ID_BUTTON, BN_SETFOCUS) }, @@ -6412,7 +6413,7 @@ static const struct message WmSetFocusOwnerdrawSeq[] = { 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|msg_todo, OBJID_CLIENT, 0 }, + { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 }, { WM_SETFOCUS, sent|wparam, 0 }, { WM_CTLCOLORBTN, sent|parent }, { WM_DRAWITEM, sent|wparam|lparam|parent, ID_BUTTON, 0x001040e4 }, @@ -6443,7 +6444,7 @@ static const struct message WmLButtonDownSeq[] = { 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|msg_todo, OBJID_CLIENT, 0 }, + { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 }, { WM_SETFOCUS, sent|wparam|defwinproc, 0 }, { WM_CTLCOLORBTN, sent|defwinproc }, { BM_SETSTATE, sent|wparam|defwinproc, TRUE }, @@ -6458,7 +6459,7 @@ static const struct message WmLButtonDownStaticSeq[] = { 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|msg_todo, OBJID_CLIENT, 0 }, + { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 }, { WM_SETFOCUS, sent|wparam|defwinproc, 0 }, { WM_CTLCOLORSTATIC, sent|defwinproc }, { BM_SETSTATE, sent|wparam|defwinproc, TRUE }, @@ -13133,7 +13134,7 @@ static const struct message sl_edit_setfocus[] = { WM_IME_SETCONTEXT, sent|wparam|optional, 1 }, { WM_IME_NOTIFY, sent|wparam|defwinproc|optional, 2 }, { EM_GETPASSWORDCHAR, sent|optional }, /* Sent on some Win10 machines */ - { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam|msg_todo, OBJID_CLIENT, 0 }, + { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 }, { WM_SETFOCUS, sent|wparam, 0 }, { WM_IME_NOTIFY, sent|wparam|defwinproc|optional, 10 }, { WM_IME_NOTIFY, sent|wparam|defwinproc|optional, 15 }, @@ -13165,7 +13166,7 @@ static const struct message ml_edit_setfocus[] = { WM_IME_SETCONTEXT, sent|wparam|optional, 1 }, { WM_IME_NOTIFY, sent|wparam|defwinproc|optional, 2 }, { EM_GETPASSWORDCHAR, sent|optional }, /* Sent on some Win10 machines */ - { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam|msg_todo, OBJID_CLIENT, 0 }, + { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 }, { WM_SETFOCUS, sent|wparam, 0 }, { WM_IME_NOTIFY, sent|wparam|defwinproc|optional, 10 }, { WM_IME_NOTIFY, sent|wparam|defwinproc|optional, 11 }, @@ -13200,7 +13201,7 @@ static const struct message sl_edit_lbutton_down[] = { WM_IME_SETCONTEXT, sent|wparam|defwinproc|optional, 1 }, { WM_IME_NOTIFY, sent|wparam|defwinproc|optional, 2 }, { EM_GETPASSWORDCHAR, sent|defwinproc|optional }, /* Sent on some Win10 machines */ - { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam|msg_todo, OBJID_CLIENT, 0 }, + { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 }, { WM_SETFOCUS, sent|wparam|defwinproc, 0 }, { WM_IME_NOTIFY, sent|wparam|defwinproc|optional, 10 }, { WM_CTLCOLOREDIT, sent|parent }, @@ -13225,7 +13226,7 @@ static const struct message ml_edit_lbutton_down[] = { WM_IME_SETCONTEXT, sent|wparam|defwinproc|optional, 1 }, { WM_IME_NOTIFY, sent|wparam|defwinproc|optional, 2 }, { EM_GETPASSWORDCHAR, sent|defwinproc|optional }, /* Sent on some Win10 machines */ - { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam|msg_todo, OBJID_CLIENT, 0 }, + { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, 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 }, @@ -14967,7 +14968,7 @@ static const struct message WmShowNormal[] = { { EVENT_SYSTEM_FOREGROUND, winevent_hook|wparam|lparam, 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|msg_todo, OBJID_CLIENT, 0 }, + { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 }, { WM_WINDOWPOSCHANGED, sent|wparam, SWP_SHOWWINDOW|SWP_NOSIZE|SWP_NOMOVE|SWP_NOCLIENTSIZE|SWP_NOCLIENTMOVE }, { EVENT_OBJECT_LOCATIONCHANGE, winevent_hook|wparam|lparam|optional, 0, 0 }, /* Win7 sends it, but Win8+ doesn't. */ { 0 } @@ -14980,6 +14981,7 @@ static const struct message WmShow[] = { { EVENT_SYSTEM_FOREGROUND, winevent_hook|wparam|lparam|wine_only, 0, 0 }, { WM_WINDOWPOSCHANGING, sent|wparam|optional, SWP_NOSIZE|SWP_NOMOVE }, /* win2000 doesn't send it */ { HCBT_SETFOCUS, hook|optional }, /* win2000 doesn't send it */ + { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam|wine_only, OBJID_CLIENT, 0 }, { WM_WINDOWPOSCHANGED, sent|wparam, SWP_SHOWWINDOW|SWP_NOSIZE|SWP_NOMOVE|SWP_NOCLIENTSIZE|SWP_NOCLIENTMOVE }, { 0 } }; @@ -15015,6 +15017,7 @@ 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_FOCUS, winevent_hook|wparam|lparam|wine_only, OBJID_CLIENT, 0 }, { EVENT_OBJECT_LOCATIONCHANGE, winevent_hook|wparam|lparam|msg_todo, 0, 0 }, { EVENT_OBJECT_LOCATIONCHANGE, winevent_hook|wparam|lparam|optional, 0, 0 }, /* Win7 seems to send this twice. */ { EVENT_SYSTEM_MINIMIZEEND, winevent_hook|wparam|lparam|msg_todo, 0, 0 }, @@ -15042,6 +15045,7 @@ static const struct message WmRestore_1[] = { { EVENT_SYSTEM_FOREGROUND, winevent_hook|wparam|lparam|wine_only, 0, 0 }, { WM_WINDOWPOSCHANGING, sent|wparam|optional, SWP_NOSIZE|SWP_NOMOVE }, /* win2000 doesn't send it */ { HCBT_SETFOCUS, hook|optional }, /* win2000 doesn't send it */ + { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam|wine_only, OBJID_CLIENT, 0 }, { WM_WINDOWPOSCHANGED, sent|wparam, SWP_SHOWWINDOW|SWP_FRAMECHANGED|SWP_NOCOPYBITS|SWP_STATECHANGED }, { WM_MOVE, sent|defwinproc }, { WM_SIZE, sent|wparam|defwinproc, SIZE_RESTORED }, @@ -15060,6 +15064,7 @@ static const struct message WmRestore_2[] = { { EVENT_SYSTEM_FOREGROUND, winevent_hook|wparam|lparam|wine_only, 0, 0 }, { WM_WINDOWPOSCHANGING, sent|wparam|optional, SWP_NOSIZE|SWP_NOMOVE }, /* win2000 doesn't send it */ { HCBT_SETFOCUS, hook|optional }, /* win2000 doesn't send it */ + { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam|wine_only, OBJID_CLIENT, 0 }, { WM_WINDOWPOSCHANGED, sent|wparam, SWP_SHOWWINDOW|SWP_NOSIZE|SWP_NOMOVE|SWP_NOCLIENTSIZE|SWP_NOCLIENTMOVE }, { 0 } }; @@ -15078,6 +15083,7 @@ static const struct message WmRestore_3[] = { { WM_MOVE, sent|defwinproc }, { WM_SIZE, sent|wparam|defwinproc, SIZE_MAXIMIZED }, { HCBT_SETFOCUS, hook|optional }, /* win2003 sends it */ + { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam|wine_only, OBJID_CLIENT, 0 }, { EVENT_OBJECT_LOCATIONCHANGE, winevent_hook|wparam|lparam|msg_todo, 0, 0 }, { EVENT_OBJECT_LOCATIONCHANGE, winevent_hook|wparam|lparam|optional, 0, 0 }, /* Win7 seems to send this twice. */ { EVENT_SYSTEM_MINIMIZEEND, winevent_hook|wparam|lparam|msg_todo, 0, 0 }, @@ -15242,6 +15248,7 @@ static const struct message WmShowMaximized_1[] = { { EVENT_SYSTEM_FOREGROUND, winevent_hook|wparam|lparam|wine_only, 0, 0 }, { WM_WINDOWPOSCHANGING, sent|wparam|optional, SWP_NOSIZE|SWP_NOMOVE }, /* win2000 doesn't send it */ { HCBT_SETFOCUS, hook|optional }, /* win2000 doesn't send it */ + { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam|wine_only, OBJID_CLIENT, 0 }, { WM_WINDOWPOSCHANGED, sent|wparam, SWP_SHOWWINDOW|SWP_FRAMECHANGED|SWP_NOCOPYBITS|SWP_STATECHANGED }, { WM_MOVE, sent|defwinproc }, { WM_SIZE, sent|wparam|defwinproc, SIZE_MAXIMIZED }, @@ -15634,7 +15641,7 @@ static const struct message WmDefDlgSetFocus_1[] = { { WM_IME_SETCONTEXT, sent|wparam|optional, 1 }, { WM_IME_NOTIFY, sent|wparam|defwinproc|optional, 2 }, { EM_GETPASSWORDCHAR, sent|optional }, /* Sent on some Win10 machines */ - { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam|msg_todo, OBJID_CLIENT, 0 }, + { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 }, { WM_SETFOCUS, sent|wparam, 0 }, { WM_IME_NOTIFY, sent|wparam|defwinproc|optional, 10 }, { WM_CTLCOLOREDIT, sent }, @@ -15695,7 +15702,7 @@ static const struct message WmCreateDialogParamSeq_1[] = { { WM_ACTIVATEAPP, sent|wparam, 1 }, { WM_NCACTIVATE, sent }, { WM_ACTIVATE, sent|wparam, 1 }, - { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam|msg_todo, OBJID_CLIENT, 0 }, + { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 }, { WM_SETFOCUS, sent }, { WM_CHANGEUISTATE, sent|optional }, { 0 } diff --git a/dlls/win32u/input.c b/dlls/win32u/input.c index b305e00b1a3..6d8045b2c99 100644 --- a/dlls/win32u/input.c +++ b/dlls/win32u/input.c @@ -1862,8 +1862,7 @@ static HWND set_focus_window( HWND hwnd ) send_message( ime_hwnd, WM_IME_INTERNAL, IME_INTERNAL_ACTIVATE, HandleToUlong(hwnd) );
- if (previous) - NtUserNotifyWinEvent( EVENT_OBJECT_FOCUS, hwnd, OBJID_CLIENT, 0 ); + NtUserNotifyWinEvent( EVENT_OBJECT_FOCUS, hwnd, OBJID_CLIENT, 0 );
send_message( hwnd, WM_SETFOCUS, (WPARAM)previous, 0 ); }
Hi,
It looks like your patch introduced the new failures shown below. Please investigate and fix them before resubmitting your patch. If they are not new, fixing them anyway would help a lot. Otherwise please ask for the known failures list to be updated.
The tests also ran into some preexisting test failures. If you know how to fix them that would be helpful. See the TestBot job for the details:
The full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=146026
Your paranoid android.
=== w7pro64 (64 bit report) ===
user32: msg.c:14957: Test failed: WmSetWindowRgn_clear: 4: the msg 0x0014 was expected, but got msg 0x0047 instead
=== debian11 (32 bit report) ===
user32: msg.c:15502: Test failed: 5: ShowWindow(SW_SHOWMINIMIZED): 7: the msg 0x0047 was expected, but got winevent_hook 0x8005 instead
=== debian11 (32 bit ar:MA report) ===
user32: msg.c:15502: Test failed: 5: ShowWindow(SW_SHOWMINIMIZED): 7: the msg 0x0047 was expected, but got winevent_hook 0x8005 instead
=== debian11 (32 bit de report) ===
user32: msg.c:15502: Test failed: 5: ShowWindow(SW_SHOWMINIMIZED): 7: the msg 0x0047 was expected, but got winevent_hook 0x8005 instead msg.c:6912: Test failed: SetFocus(hwnd) on a button: 3: the winevent_hook 0x8005 was expected, but got hook 0x0005 instead msg.c:6912: Test failed: SetFocus(hwnd) on a button: 3: the winevent_hook 0x8005 was expected, but got winevent_hook 0x0003 instead msg.c:6912: Test failed: SetFocus(hwnd) on a button: 3: the winevent_hook 0x8005 was expected, but got msg 0x030f instead msg.c:6912: Test failed: SetFocus(hwnd) on a button: 3: the winevent_hook 0x8005 was expected, but got msg 0x001c instead msg.c:6912: Test failed: SetFocus(hwnd) on a button: 3: the winevent_hook 0x8005 was expected, but got msg 0x0086 instead msg.c:6912: Test failed: SetFocus(hwnd) on a button: 3: the winevent_hook 0x8005 was expected, but got msg 0x0006 instead msg.c:6912: Test failed: SetFocus(hwnd) on a button: 3: the winevent_hook 0x8005 was expected, but got hook 0x0009 instead
=== debian11 (32 bit fr report) ===
user32: msg.c:15502: Test failed: 5: ShowWindow(SW_SHOWMINIMIZED): 7: the msg 0x0047 was expected, but got winevent_hook 0x8005 instead
=== debian11 (32 bit he:IL report) ===
user32: msg.c:15502: Test failed: 5: ShowWindow(SW_SHOWMINIMIZED): 7: the msg 0x0047 was expected, but got winevent_hook 0x8005 instead
=== debian11 (32 bit hi:IN report) ===
user32: msg.c:15502: Test failed: 5: ShowWindow(SW_SHOWMINIMIZED): 7: the msg 0x0047 was expected, but got winevent_hook 0x8005 instead
=== debian11 (32 bit ja:JP report) ===
user32: msg.c:15502: Test failed: 5: ShowWindow(SW_SHOWMINIMIZED): 7: the msg 0x0047 was expected, but got winevent_hook 0x8005 instead
=== debian11 (32 bit zh:CN report) ===
user32: msg.c:15502: Test failed: 5: ShowWindow(SW_SHOWMINIMIZED): 7: the msg 0x0047 was expected, but got winevent_hook 0x8005 instead
=== debian11b (32 bit WoW report) ===
user32: msg.c:15502: Test failed: 5: ShowWindow(SW_SHOWMINIMIZED): 7: the msg 0x0047 was expected, but got winevent_hook 0x8005 instead
=== debian11b (64 bit WoW report) ===
user32: msg.c:15502: Test failed: 5: ShowWindow(SW_SHOWMINIMIZED): 7: the msg 0x0047 was expected, but got winevent_hook 0x8005 instead
This merge request was approved by Rémi Bernon.
I see a failure in the merge pipeline that's likely related.
Side note: It's a bit weird that test-linux-64 only runs the dinput tests. So the 32-bit-only failures don't actually imply a random or architecture-specific failure as it would seem at a glance.