The NVDA screen reader needs this.
Signed-off-by: Alex Henrie alexhenrie24@gmail.com --- dlls/user32/focus.c | 3 ++ dlls/user32/tests/msg.c | 104 ++++++++++++++++++++-------------------- 2 files changed, 55 insertions(+), 52 deletions(-)
diff --git a/dlls/user32/focus.c b/dlls/user32/focus.c index 34cc3880cc9..a20151ad5df 100644 --- a/dlls/user32/focus.c +++ b/dlls/user32/focus.c @@ -73,6 +73,9 @@ static HWND set_focus_window( HWND hwnd ) if (ime_default) SendMessageW( ime_default, WM_IME_INTERNAL, IME_INTERNAL_ACTIVATE, (LPARAM)hwnd );
+ if (previous) + NotifyWinEvent( EVENT_OBJECT_FOCUS, hwnd, OBJID_CLIENT, 0 ); + SendMessageW( hwnd, WM_SETFOCUS, (WPARAM)previous, 0 ); } return previous; diff --git a/dlls/user32/tests/msg.c b/dlls/user32/tests/msg.c index c054a145112..55047f32479 100644 --- a/dlls/user32/tests/msg.c +++ b/dlls/user32/tests/msg.c @@ -388,13 +388,13 @@ static const struct message WmSwitchNotMaximizedChild[] = { { WM_KILLFOCUS, sent|defwinproc }, /* in the 1st MDI child */ { WM_IME_SETCONTEXT, sent|defwinproc|optional }, /* in the 1st MDI child */ { WM_IME_SETCONTEXT, sent|optional }, /* in the MDI client */ - { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam|winevent_hook_todo, OBJID_CLIENT, 0 }, + { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 }, { WM_SETFOCUS, sent, 0 }, /* in the MDI client */ { HCBT_SETFOCUS, hook }, { WM_KILLFOCUS, sent }, /* in the MDI client */ { WM_IME_SETCONTEXT, sent|optional }, /* in the MDI client */ { WM_IME_SETCONTEXT, sent|defwinproc|optional }, /* in the 1st MDI child */ - { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam|winevent_hook_todo, OBJID_CLIENT, 0 }, + { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 }, { WM_SETFOCUS, sent|defwinproc }, /* in the 2nd MDI child */ { WM_MDIACTIVATE, sent|defwinproc }, /* in the 2nd MDI child */ { WM_WINDOWPOSCHANGED, sent|wparam, SWP_NOSIZE|SWP_NOMOVE|SWP_NOCLIENTSIZE|SWP_NOCLIENTMOVE}, /* in the 2nd MDI child */ @@ -916,7 +916,7 @@ static const struct message WmShowRestoreMinimizedOverlappedSeq[] = { WM_GETTEXT, sent|defwinproc|optional }, { WM_ACTIVATE, sent|wparam, WA_ACTIVE }, { HCBT_SETFOCUS, hook }, - { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam|winevent_hook_todo, OBJID_CLIENT, 0 }, + { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 }, { WM_SETFOCUS, sent|defwinproc }, { WM_NCPAINT, sent }, { WM_GETTEXT, sent|defwinproc|optional }, @@ -1011,7 +1011,7 @@ static const struct message WmShowRestoreActiveMinimizedOverlappedSeq[] = { EVENT_OBJECT_LOCATIONCHANGE, winevent_hook|wparam|lparam|optional, 0, 0 }, /* Win7 seems to send this twice. */ { EVENT_SYSTEM_MINIMIZEEND, winevent_hook|wparam|lparam|winevent_hook_todo, 0, 0 }, { HCBT_SETFOCUS, hook }, - { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam|winevent_hook_todo, OBJID_CLIENT, 0 }, + { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 }, { WM_SETFOCUS, sent }, /* Note this WM_ACTIVATE message even if the window is already active */ { WM_ACTIVATE, sent|wparam|lparam, WA_ACTIVE, 0 }, @@ -1110,7 +1110,7 @@ static const struct message WmShowVisiblePopupSeq_3[] = { { WM_IME_SETCONTEXT, sent|parent|wparam|optional, 0 }, { WM_IME_SETCONTEXT, sent|wparam|defwinproc|optional, 1 }, { WM_IME_NOTIFY, sent|wparam|defwinproc|optional, 2 }, - { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam|winevent_hook_todo, OBJID_CLIENT, 0 }, + { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 }, { WM_SETFOCUS, sent|defwinproc }, { WM_GETTEXT, sent|optional }, { WM_WINDOWPOSCHANGED, sent|wparam|optional, SWP_NOSIZE|SWP_NOMOVE|SWP_NOCLIENTSIZE|SWP_NOCLIENTMOVE, 0, SWP_SHOWWINDOW }, @@ -1614,7 +1614,7 @@ static const struct message WmDestroyChildSeq[] = { { WM_KILLFOCUS, sent }, { WM_IME_SETCONTEXT, sent|wparam|optional, 0 }, { WM_IME_SETCONTEXT, sent|wparam|parent|optional, 1 }, - { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam|winevent_hook_todo, OBJID_CLIENT, 0 }, + { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 }, { WM_SETFOCUS, sent|parent }, { EVENT_OBJECT_DESTROY, winevent_hook|wparam|lparam|winevent_hook_todo, 0, 0 }, { WM_DESTROY, sent }, @@ -1690,7 +1690,7 @@ static const struct message WmCreateCustomDialogSeq[] = { { WM_IME_SETCONTEXT, sent|parent|wparam|optional, 0 }, { WM_IME_SETCONTEXT, sent|wparam|optional, 1 }, { WM_IME_NOTIFY, sent|wparam|defwinproc|optional, 2 }, - { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam|winevent_hook_todo, OBJID_CLIENT, 0 }, + { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 }, { WM_SETFOCUS, sent }, { WM_GETDLGCODE, sent|defwinproc|wparam, 0 }, { WM_NCPAINT, sent|wparam, 1 }, @@ -1733,7 +1733,7 @@ static const struct message WmEndCustomDialogSeq[] = { { WM_IME_SETCONTEXT, sent|wparam|optional, 0 }, { WM_IME_SETCONTEXT, sent|parent|wparam|defwinproc|optional, 1 }, { WM_IME_NOTIFY, sent|wparam|optional, 1 }, - { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam|winevent_hook_todo, OBJID_CLIENT, 0 }, + { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 }, { WM_SETFOCUS, sent|parent|defwinproc }, { 0 } }; @@ -1757,7 +1757,7 @@ static const struct message WmShowCustomDialogSeq[] = { { WM_IME_SETCONTEXT, sent|parent|wparam|optional, 0 }, { WM_IME_SETCONTEXT, sent|wparam|optional, 1 }, { WM_IME_NOTIFY, sent|wparam|defwinproc|optional, 2 }, - { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam|winevent_hook_todo, OBJID_CLIENT, 0 }, + { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 }, { WM_SETFOCUS, sent }, { WM_GETDLGCODE, sent|defwinproc|wparam, 0 }, { WM_NCPAINT, sent|wparam, 1 }, @@ -1770,7 +1770,7 @@ static const struct message WmShowCustomDialogSeq[] = { static const struct message WmModalDialogSeq[] = { { WM_CANCELMODE, sent|parent }, { HCBT_SETFOCUS, hook }, - { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam|winevent_hook_todo, OBJID_CLIENT, 0 }, + { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 }, { WM_KILLFOCUS, sent|parent }, { WM_IME_SETCONTEXT, sent|parent|wparam|optional, 0 }, { EVENT_OBJECT_STATECHANGE, winevent_hook|wparam|lparam|winevent_hook_todo, 0, 0 }, @@ -1843,7 +1843,7 @@ static const struct message WmModalDialogSeq[] = { { WM_WINDOWPOSCHANGED, sent|optional }, { HCBT_SETFOCUS, hook }, { WM_IME_SETCONTEXT, sent|parent|wparam|defwinproc|optional, 1 }, - { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam|winevent_hook_todo, OBJID_CLIENT, 0 }, + { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 }, { WM_SETFOCUS, sent|parent|defwinproc }, { EVENT_SYSTEM_DIALOGEND, winevent_hook|wparam|lparam|winevent_hook_todo, 0, 0 }, { HCBT_DESTROYWND, hook }, @@ -1856,7 +1856,7 @@ static const struct message WmModalDialogSeq[] = { static const struct message WmModalDialogSeq_2[] = { { WM_CANCELMODE, sent }, { HCBT_SETFOCUS, hook }, - { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam|winevent_hook_todo, OBJID_CLIENT, 0 }, + { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 }, { WM_KILLFOCUS, sent }, { WM_IME_SETCONTEXT, sent|parent|wparam|optional, 0 }, { EVENT_OBJECT_STATECHANGE, winevent_hook|wparam|lparam|winevent_hook_todo, 0, 0 }, @@ -2150,7 +2150,7 @@ static const struct message WmTrackPopupMenuMinimizeWindow[] = { { WM_ENTERIDLE, sent|wparam, 2 }, { HCBT_MINMAX, hook }, { HCBT_SETFOCUS, hook }, - { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam|winevent_hook_todo, OBJID_CLIENT, 0 }, + { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 }, { WM_KILLFOCUS, sent|wparam, 0 }, { WM_GETTEXT, sent|optional }, { WM_WINDOWPOSCHANGING, sent }, @@ -3055,7 +3055,7 @@ static const struct message WmCreateMDIchildVisibleSeq[] = { { WM_KILLFOCUS, sent }, /* in MDI client */ { WM_IME_SETCONTEXT, sent|wparam|optional, 0 }, /* in MDI client */ { WM_IME_SETCONTEXT, sent|wparam|defwinproc|optional, 1 }, - { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam|winevent_hook_todo, OBJID_CLIENT, 0 }, + { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 }, { WM_SETFOCUS, sent|defwinproc }, { WM_MDIACTIVATE, sent|defwinproc }, { 0 } @@ -3076,11 +3076,11 @@ static const struct message WmChildActivateWindowSeq[] = { { WM_NCACTIVATE, sent|wparam|defwinproc, 1 }, { HCBT_SETFOCUS, hook }, { WM_KILLFOCUS, sent|defwinproc }, - { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam|winevent_hook_todo, OBJID_CLIENT, 0 }, + { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 }, { WM_SETFOCUS, sent }, { HCBT_SETFOCUS, hook }, { WM_KILLFOCUS, sent }, - { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam|winevent_hook_todo, OBJID_CLIENT, 0 }, + { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 }, { WM_SETFOCUS, sent|defwinproc }, { WM_MDIACTIVATE, sent|defwinproc }, { 0 } @@ -3115,7 +3115,7 @@ static const struct message WmCreateMDIchildInvisibleParentSeq[] = { { WM_KILLFOCUS, sent }, /* in MDI client */ { WM_IME_SETCONTEXT, sent|wparam|optional, 0 }, /* in MDI client */ { WM_IME_SETCONTEXT, sent|wparam|defwinproc|optional, 1 }, - { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam|winevent_hook_todo, OBJID_CLIENT, 0 }, + { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 }, { WM_SETFOCUS, sent|defwinproc }, { WM_MDIACTIVATE, sent|defwinproc }, { 0 } @@ -3144,14 +3144,14 @@ static const struct message WmDestroyMDIchildVisibleSeq[] = { { WM_KILLFOCUS, sent }, { WM_IME_SETCONTEXT, sent|wparam|optional, 0 }, { WM_IME_SETCONTEXT, sent|wparam|optional, 1 }, /* in MDI client */ - { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam|winevent_hook_todo, OBJID_CLIENT, 0 }, + { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 }, { WM_SETFOCUS, sent }, /* in MDI client */
{ HCBT_SETFOCUS, hook }, /* MDI client sets focus back to MDI child */ { WM_KILLFOCUS, sent }, /* in MDI client */ { WM_IME_SETCONTEXT, sent|wparam|optional, 0 }, /* in MDI client */ { WM_IME_SETCONTEXT, sent|wparam|optional, 1 }, - { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam|winevent_hook_todo, OBJID_CLIENT, 0 }, + { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 }, { WM_SETFOCUS, sent }, /* in MDI client */
{ EVENT_OBJECT_DESTROY, winevent_hook|wparam|lparam|winevent_hook_todo, 0, 0 }, @@ -3160,14 +3160,14 @@ static const struct message WmDestroyMDIchildVisibleSeq[] = { { WM_KILLFOCUS, sent }, { WM_IME_SETCONTEXT, sent|wparam|optional, 0 }, { WM_IME_SETCONTEXT, sent|wparam|optional, 1 }, /* in MDI client */ - { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam|winevent_hook_todo, OBJID_CLIENT, 0 }, + { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 }, { WM_SETFOCUS, sent }, /* in MDI client */
{ HCBT_SETFOCUS, hook }, /* MDI client sets focus back to MDI child */ { WM_KILLFOCUS, sent }, /* in MDI client */ { WM_IME_SETCONTEXT, sent|wparam|optional, 0 }, /* in MDI client */ { WM_IME_SETCONTEXT, sent|wparam|optional, 1 }, - { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam|winevent_hook_todo, OBJID_CLIENT, 0 }, + { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 }, { WM_SETFOCUS, sent }, /* in MDI client */
{ WM_DESTROY, sent }, @@ -3176,14 +3176,14 @@ static const struct message WmDestroyMDIchildVisibleSeq[] = { { WM_KILLFOCUS, sent }, { WM_IME_SETCONTEXT, sent|wparam|optional, 0 }, { WM_IME_SETCONTEXT, sent|wparam|optional, 1 }, /* in MDI client */ - { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam|winevent_hook_todo, OBJID_CLIENT, 0 }, + { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 }, { WM_SETFOCUS, sent }, /* in MDI client */
{ HCBT_SETFOCUS, hook }, /* MDI client sets focus back to MDI child */ { WM_KILLFOCUS, sent }, /* in MDI client */ { WM_IME_SETCONTEXT, sent|wparam|optional, 0 }, /* in MDI client */ { WM_IME_SETCONTEXT, sent|wparam|optional, 1 }, - { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam|winevent_hook_todo, OBJID_CLIENT, 0 }, + { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 }, { WM_SETFOCUS, sent }, /* in MDI client */
{ WM_NCDESTROY, sent }, @@ -3265,13 +3265,13 @@ static const struct message WmCreateMDIchildVisibleMaxSeq1[] = { { HCBT_SETFOCUS, hook|optional }, /* 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|winevent_hook_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 */ { WM_IME_SETCONTEXT, sent|wparam|optional, 0 }, /* in MDI client */ { WM_IME_SETCONTEXT, sent|wparam|defwinproc|optional, 1 }, - { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam|winevent_hook_todo, OBJID_CLIENT, 0 }, + { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 }, { WM_SETFOCUS, sent|defwinproc|optional }, { WM_MDIACTIVATE, sent|defwinproc|optional }, /* in MDI frame */ @@ -3345,13 +3345,13 @@ static const struct message WmCreateMDIchildVisibleMaxSeq2[] = { { WM_KILLFOCUS, sent|defwinproc|optional }, /* in the 1st MDI child */ { WM_IME_SETCONTEXT, sent|wparam|defwinproc|optional, 0 }, /* in the 1st MDI child */ { WM_IME_SETCONTEXT, sent|wparam|optional, 1 }, /* in MDI client */ - { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam|winevent_hook_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 */ { WM_IME_SETCONTEXT, sent|wparam|optional, 0 }, /* in MDI client */ { WM_IME_SETCONTEXT, sent|wparam|defwinproc|optional, 1 }, - { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam|winevent_hook_todo, OBJID_CLIENT, 0 }, + { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 }, { WM_SETFOCUS, sent|defwinproc },
{ WM_MDIACTIVATE, sent|defwinproc }, @@ -3417,7 +3417,7 @@ static const struct message WmCreateMDIchildVisibleMaxSeq3[] = { { WM_KILLFOCUS, sent }, /* in MDI client */ { WM_IME_SETCONTEXT, sent|wparam|optional, 0 }, /* in MDI client */ { WM_IME_SETCONTEXT, sent|wparam|defwinproc|optional, 1 }, - { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam|winevent_hook_todo, OBJID_CLIENT, 0 }, + { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 }, { WM_SETFOCUS, sent|defwinproc },
{ WM_MDIACTIVATE, sent|defwinproc }, @@ -3556,13 +3556,13 @@ static const struct message WmDestroyMDIchildVisibleMaxSeq2[] = { { WM_KILLFOCUS, sent|defwinproc }, { WM_IME_SETCONTEXT, sent|wparam|defwinproc|optional, 0 }, { WM_IME_SETCONTEXT, sent|wparam|optional, 1 }, /* in MDI client */ - { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam|winevent_hook_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 */ { WM_IME_SETCONTEXT, sent|wparam|optional, 0 }, /* in MDI client */ { WM_IME_SETCONTEXT, sent|wparam|defwinproc|optional, 1 }, - { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam|winevent_hook_todo, OBJID_CLIENT, 0 }, + { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 }, { WM_SETFOCUS, sent|defwinproc }, { WM_MDIACTIVATE, sent|defwinproc }, { WM_WINDOWPOSCHANGED, sent|wparam|defwinproc, SWP_NOSIZE|SWP_NOMOVE|SWP_NOREDRAW|SWP_NOCLIENTSIZE|SWP_NOCLIENTMOVE }, @@ -3606,13 +3606,13 @@ static const struct message WmDestroyMDIchildVisibleMaxSeq1[] = { { WM_KILLFOCUS, sent }, { WM_IME_SETCONTEXT, sent|wparam|optional, 0 }, { WM_IME_SETCONTEXT, sent|wparam|optional, 1 }, /* in MDI client */ - { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam|winevent_hook_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 */ { WM_IME_SETCONTEXT, sent|wparam|optional, 0 }, /* in MDI client */ { WM_IME_SETCONTEXT, sent|wparam|optional, 1 }, - { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam|winevent_hook_todo, OBJID_CLIENT, 0 }, + { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 }, { WM_SETFOCUS, sent },
/* in MDI child */ @@ -3738,7 +3738,7 @@ static const struct message WmDestroyMDIchildVisibleMaxSeq1[] = { { WM_KILLFOCUS, sent }, { WM_IME_SETCONTEXT, sent|wparam|optional, 0 }, { WM_IME_SETCONTEXT, sent|wparam|optional, 1 }, /* in MDI client */ - { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam|winevent_hook_todo, OBJID_CLIENT, 0 }, + { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 }, { WM_SETFOCUS, sent }, /* in MDI client */
{ WM_MDIREFRESHMENU, sent }, /* in MDI client */ @@ -3782,7 +3782,7 @@ static const struct message WmMaximizeMDIchildInvisibleSeq[] = { { WM_KILLFOCUS, sent|optional }, /* in MDI client */ { WM_IME_SETCONTEXT, sent|wparam|optional, 0 }, /* in MDI client */ { WM_IME_SETCONTEXT, sent|wparam|defwinproc|optional, 1 }, - { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam|winevent_hook_todo, OBJID_CLIENT, 0 }, + { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 }, { WM_SETFOCUS, sent|optional|defwinproc }, { WM_MDIACTIVATE, sent|optional|defwinproc }, { WM_WINDOWPOSCHANGED, sent|wparam, SWP_SHOWWINDOW|SWP_FRAMECHANGED|SWP_NOMOVE|SWP_NOCLIENTMOVE|SWP_STATECHANGED }, @@ -3815,7 +3815,7 @@ static const struct message WmMaximizeMDIchildInvisibleSeq2[] = { { WM_KILLFOCUS, sent|optional }, /* in MDI client */ { WM_IME_SETCONTEXT, sent|wparam|optional, 0 }, /* in MDI client */ { WM_IME_SETCONTEXT, sent|wparam|defwinproc|optional, 1 }, - { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam|winevent_hook_todo, OBJID_CLIENT, 0 }, + { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 }, { WM_SETFOCUS, sent|defwinproc|optional }, { WM_MDIACTIVATE, sent|defwinproc|optional }, { WM_WINDOWPOSCHANGED, sent|wparam, SWP_SHOWWINDOW|SWP_FRAMECHANGED|SWP_NOSIZE|SWP_NOMOVE|SWP_NOCLIENTSIZE|SWP_NOCLIENTMOVE, 0, SWP_STATECHANGED /* w1064v1809 */ }, @@ -5322,7 +5322,7 @@ static const struct message WmZOrder[] = { { 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|winevent_hook_todo, OBJID_CLIENT, 0 }, + { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 }, { WM_SETFOCUS, sent|wparam|defwinproc, 0 }, { WM_WINDOWPOSCHANGED, sent|wparam, SWP_NOSIZE|SWP_NOMOVE|SWP_NOREDRAW|SWP_NOCLIENTSIZE|SWP_NOCLIENTMOVE }, { WM_GETTEXT, sent|optional }, @@ -7282,7 +7282,7 @@ static const struct message auto_radio_button_VK_DOWN_dialog[] = { WM_KILLFOCUS, sent, 0, 0 }, { WM_CTLCOLORSTATIC, sent|parent }, { WM_COMMAND, sent|wparam|parent, MAKEWPARAM(ID_RADIO3, BN_KILLFOCUS) }, - { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam|winevent_hook_todo, OBJID_CLIENT, 0 }, + { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 }, { WM_SETFOCUS, sent, 0, 0 }, { WM_CTLCOLORSTATIC, sent|parent }, { WM_COMMAND, sent|wparam|parent, MAKEWPARAM(ID_RADIO1, BN_SETFOCUS) }, @@ -11927,7 +11927,7 @@ static const struct message sl_edit_invisible[] = { WM_IME_NOTIFY, sent|wparam|defwinproc|optional, 2 }, { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam|optional, OBJID_CLIENT, 0 }, /* Sent for IME. */ { WM_KILLFOCUS, sent|parent }, - { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam|winevent_hook_todo, OBJID_CLIENT, 0 }, + { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 }, { WM_SETFOCUS, sent }, { EVENT_OBJECT_CREATE, winevent_hook|wparam|lparam|winevent_hook_todo, OBJID_CARET, 0 }, { EVENT_OBJECT_SHOW, winevent_hook|wparam|lparam|winevent_hook_todo, OBJID_CARET, 0 }, @@ -14283,7 +14283,7 @@ static const struct message WmCreateDialogParamSeq_4[] = { { WM_NCACTIVATE, sent|parent }, { WM_ACTIVATE, sent|parent|wparam, 1 }, { HCBT_SETFOCUS, hook }, - { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam|winevent_hook_todo, OBJID_CLIENT, 0 }, + { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 }, { WM_SETFOCUS, sent|parent }, { WM_KILLFOCUS, sent|parent }, { WM_SETFOCUS, sent }, @@ -14482,7 +14482,7 @@ static void test_enddialog_seq(HWND dialog, HWND owner) { WM_ACTIVATE, sent|wparam|lparam, WA_ACTIVE, (LPARAM)dialog }, { HCBT_SETFOCUS, hook|wparam, (WPARAM)owner }, { WM_KILLFOCUS, sent|wparam, (WPARAM)owner }, - { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam|winevent_hook_todo, OBJID_CLIENT, 0 }, + { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 }, { WM_SETFOCUS, sent|defwinproc|wparam, (WPARAM)dialog }, { 0 } }; @@ -14506,7 +14506,7 @@ static void test_enddialog_seq2(HWND dialog, HWND owner) { WM_WINDOWPOSCHANGING, sent|optional|wparam, SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE }, { HCBT_SETFOCUS, hook|wparam, (WPARAM)owner }, { WM_KILLFOCUS, sent|wparam, (WPARAM)owner }, - { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam|winevent_hook_todo, OBJID_CLIENT, 0 }, + { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 }, { WM_SETFOCUS, sent|parent|defwinproc|wparam, (WPARAM)dialog }, { 0 } }; @@ -14703,7 +14703,7 @@ static const struct message SetActiveWindowSeq2[] = { WM_IME_SETCONTEXT, sent|wparam|defwinproc|optional, 1 }, { WM_IME_NOTIFY, sent|wparam|defwinproc|optional, 1 }, { WM_IME_NOTIFY, sent|wparam|defwinproc|optional, 2 }, - { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam|winevent_hook_todo, OBJID_CLIENT, 0 }, + { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 }, { WM_SETFOCUS, sent|defwinproc }, { WM_GETTEXT, sent|optional }, { 0 } @@ -14726,7 +14726,7 @@ static const struct message SetActiveWindowSeq3[] = { 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|winevent_hook_todo, OBJID_CLIENT, 0 }, + { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 }, { WM_SETFOCUS, sent|defwinproc }, { 0 } }; @@ -14752,7 +14752,7 @@ static const struct message SetActiveWindowSeq4[] = { WM_IME_SETCONTEXT, sent|wparam|defwinproc|optional, 1 }, { WM_IME_NOTIFY, sent|wparam|defwinproc|optional, 1 }, { WM_IME_NOTIFY, sent|wparam|defwinproc|optional, 2 }, - { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam|winevent_hook_todo, OBJID_CLIENT, 0 }, + { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 }, { WM_SETFOCUS, sent|defwinproc }, { 0 } }; @@ -15312,7 +15312,7 @@ static const struct message wm_lb_click_0[] = { WM_KILLFOCUS, sent|parent }, { WM_IME_SETCONTEXT, sent|wparam|optional|parent, 0 }, { WM_IME_SETCONTEXT, sent|wparam|defwinproc|optional, 1 }, - { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam|winevent_hook_todo, OBJID_CLIENT, 0 }, + { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 }, { WM_SETFOCUS, sent|defwinproc },
{ WM_DRAWITEM, sent|wparam|lparam|parent, ID_LISTBOX, 0x001142f2 }, @@ -16085,7 +16085,7 @@ static const struct message WmRestoreMinimizedOverlappedSeq[] = { WM_GETTEXT, sent|defwinproc|optional }, { WM_ACTIVATE, sent|wparam, TRUE }, { HCBT_SETFOCUS, hook }, - { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam|winevent_hook_todo, OBJID_CLIENT, 0 }, + { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 }, { WM_SETFOCUS, sent|defwinproc }, { WM_NCPAINT, sent }, { WM_GETTEXT, sent|defwinproc|optional }, @@ -16138,7 +16138,7 @@ static const struct message WmRestoreActiveMinimizedOverlappedSeq[] = { EVENT_OBJECT_LOCATIONCHANGE, winevent_hook|wparam|lparam|optional, 0, 0 }, /* Win7 seems to send this twice. */ { EVENT_SYSTEM_MINIMIZEEND, winevent_hook|wparam|lparam|winevent_hook_todo, 0, 0 }, { HCBT_SETFOCUS, hook }, - { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam|winevent_hook_todo, OBJID_CLIENT, 0 }, + { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 }, { WM_SETFOCUS, sent }, /* Note this WM_ACTIVATE messages even if the window is already active */ { WM_ACTIVATE, sent|wparam|lparam, WA_ACTIVE, 0 }, @@ -17072,7 +17072,7 @@ static const struct message WmSetParentSeq_2[] = { { WM_NCACTIVATE, sent|wparam|optional, 0 }, { WM_ACTIVATE, sent|wparam|optional, 0 }, { WM_ACTIVATEAPP, sent|wparam|optional, 0 }, - { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam|winevent_hook_todo, OBJID_CLIENT, 0 }, + { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 }, { WM_KILLFOCUS, sent|wparam, 0 }, { EVENT_OBJECT_PARENTCHANGE, winevent_hook|wparam|lparam|winevent_hook_todo, 0, 0 }, { WM_WINDOWPOSCHANGING, sent|wparam, SWP_NOSIZE }, @@ -17739,17 +17739,17 @@ static const struct message WmSetFocus_1[] = { { WM_GETTEXT, sent|defwinproc|parent|optional }, { WM_ACTIVATE, sent|wparam|parent, 1 }, { HCBT_SETFOCUS, hook }, /* parent */ - { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam|winevent_hook_todo, OBJID_CLIENT, 0 }, + { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 }, { WM_SETFOCUS, sent|defwinproc|parent }, { WM_KILLFOCUS, sent|parent }, - { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam|winevent_hook_todo, OBJID_CLIENT, 0 }, + { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 }, { WM_SETFOCUS, sent }, { 0 } }; static const struct message WmSetFocus_2[] = { { HCBT_SETFOCUS, hook }, /* parent */ { WM_KILLFOCUS, sent }, - { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam|winevent_hook_todo, OBJID_CLIENT, 0 }, + { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 }, { WM_SETFOCUS, sent|parent }, { 0 } }; @@ -18600,7 +18600,7 @@ static const struct message WmRestoreMinimizedSeq[] = { WM_NCPAINT, sent|wparam|defwinproc|optional, 1 }, { WM_ERASEBKGND, sent|defwinproc|optional }, { HCBT_SETFOCUS, hook }, - { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam|winevent_hook_todo, OBJID_CLIENT, 0 }, + { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 }, { WM_SETFOCUS, sent|defwinproc }, { WM_ACTIVATE, sent|wparam|defwinproc, 1 }, { WM_PAINT, sent| optional },
Hi, are you sure this doesn't introduce new failures on wine, WRT HCBT_SETFOCUS hooks? I sent a patch for this back in October, and it had issues with those. https://www.winehq.org/pipermail/wine-devel/2021-October/197568.html
On Sun, Nov 28, 2021 at 3:39 PM Alex Henrie alexhenrie24@gmail.com wrote:
The NVDA screen reader needs this.
Signed-off-by: Alex Henrie alexhenrie24@gmail.com
dlls/user32/focus.c | 3 ++ dlls/user32/tests/msg.c | 104 ++++++++++++++++++++-------------------- 2 files changed, 55 insertions(+), 52 deletions(-)
diff --git a/dlls/user32/focus.c b/dlls/user32/focus.c index 34cc3880cc9..a20151ad5df 100644 --- a/dlls/user32/focus.c +++ b/dlls/user32/focus.c @@ -73,6 +73,9 @@ static HWND set_focus_window( HWND hwnd ) if (ime_default) SendMessageW( ime_default, WM_IME_INTERNAL, IME_INTERNAL_ACTIVATE, (LPARAM)hwnd );
if (previous)
NotifyWinEvent( EVENT_OBJECT_FOCUS, hwnd, OBJID_CLIENT, 0 );
} return previous;SendMessageW( hwnd, WM_SETFOCUS, (WPARAM)previous, 0 );
diff --git a/dlls/user32/tests/msg.c b/dlls/user32/tests/msg.c index c054a145112..55047f32479 100644 --- a/dlls/user32/tests/msg.c +++ b/dlls/user32/tests/msg.c @@ -388,13 +388,13 @@ static const struct message WmSwitchNotMaximizedChild[] = { { WM_KILLFOCUS, sent|defwinproc }, /* in the 1st MDI child */ { WM_IME_SETCONTEXT, sent|defwinproc|optional }, /* in the 1st MDI child */ { WM_IME_SETCONTEXT, sent|optional }, /* in the MDI client */
- { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam|winevent_hook_todo, OBJID_CLIENT, 0 },
- { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 }, { WM_SETFOCUS, sent, 0 }, /* in the MDI client */ { HCBT_SETFOCUS, hook }, { WM_KILLFOCUS, sent }, /* in the MDI client */ { WM_IME_SETCONTEXT, sent|optional }, /* in the MDI client */ { WM_IME_SETCONTEXT, sent|defwinproc|optional }, /* in the 1st MDI child */
- { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam|winevent_hook_todo, OBJID_CLIENT, 0 },
- { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 }, { WM_SETFOCUS, sent|defwinproc }, /* in the 2nd MDI child */ { WM_MDIACTIVATE, sent|defwinproc }, /* in the 2nd MDI child */ { WM_WINDOWPOSCHANGED, sent|wparam, SWP_NOSIZE|SWP_NOMOVE|SWP_NOCLIENTSIZE|SWP_NOCLIENTMOVE}, /* in the 2nd MDI child */
@@ -916,7 +916,7 @@ static const struct message WmShowRestoreMinimizedOverlappedSeq[] = { WM_GETTEXT, sent|defwinproc|optional }, { WM_ACTIVATE, sent|wparam, WA_ACTIVE }, { HCBT_SETFOCUS, hook },
- { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam|winevent_hook_todo, OBJID_CLIENT, 0 },
- { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 }, { WM_SETFOCUS, sent|defwinproc }, { WM_NCPAINT, sent }, { WM_GETTEXT, sent|defwinproc|optional },
@@ -1011,7 +1011,7 @@ static const struct message WmShowRestoreActiveMinimizedOverlappedSeq[] = { EVENT_OBJECT_LOCATIONCHANGE, winevent_hook|wparam|lparam|optional, 0, 0 }, /* Win7 seems to send this twice. */ { EVENT_SYSTEM_MINIMIZEEND, winevent_hook|wparam|lparam|winevent_hook_todo, 0, 0 }, { HCBT_SETFOCUS, hook },
- { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam|winevent_hook_todo, OBJID_CLIENT, 0 },
- { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 }, { WM_SETFOCUS, sent }, /* Note this WM_ACTIVATE message even if the window is already active */ { WM_ACTIVATE, sent|wparam|lparam, WA_ACTIVE, 0 },
@@ -1110,7 +1110,7 @@ static const struct message WmShowVisiblePopupSeq_3[] = { { WM_IME_SETCONTEXT, sent|parent|wparam|optional, 0 }, { WM_IME_SETCONTEXT, sent|wparam|defwinproc|optional, 1 }, { WM_IME_NOTIFY, sent|wparam|defwinproc|optional, 2 },
- { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam|winevent_hook_todo, OBJID_CLIENT, 0 },
- { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 }, { WM_SETFOCUS, sent|defwinproc }, { WM_GETTEXT, sent|optional }, { WM_WINDOWPOSCHANGED, sent|wparam|optional, SWP_NOSIZE|SWP_NOMOVE|SWP_NOCLIENTSIZE|SWP_NOCLIENTMOVE, 0, SWP_SHOWWINDOW },
@@ -1614,7 +1614,7 @@ static const struct message WmDestroyChildSeq[] = { { WM_KILLFOCUS, sent }, { WM_IME_SETCONTEXT, sent|wparam|optional, 0 }, { WM_IME_SETCONTEXT, sent|wparam|parent|optional, 1 },
- { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam|winevent_hook_todo, OBJID_CLIENT, 0 },
- { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 }, { WM_SETFOCUS, sent|parent }, { EVENT_OBJECT_DESTROY, winevent_hook|wparam|lparam|winevent_hook_todo, 0, 0 }, { WM_DESTROY, sent },
@@ -1690,7 +1690,7 @@ static const struct message WmCreateCustomDialogSeq[] = { { WM_IME_SETCONTEXT, sent|parent|wparam|optional, 0 }, { WM_IME_SETCONTEXT, sent|wparam|optional, 1 }, { WM_IME_NOTIFY, sent|wparam|defwinproc|optional, 2 },
- { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam|winevent_hook_todo, OBJID_CLIENT, 0 },
- { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 }, { WM_SETFOCUS, sent }, { WM_GETDLGCODE, sent|defwinproc|wparam, 0 }, { WM_NCPAINT, sent|wparam, 1 },
@@ -1733,7 +1733,7 @@ static const struct message WmEndCustomDialogSeq[] = { { WM_IME_SETCONTEXT, sent|wparam|optional, 0 }, { WM_IME_SETCONTEXT, sent|parent|wparam|defwinproc|optional, 1 }, { WM_IME_NOTIFY, sent|wparam|optional, 1 },
- { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam|winevent_hook_todo, OBJID_CLIENT, 0 },
- { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 }, { WM_SETFOCUS, sent|parent|defwinproc }, { 0 }
}; @@ -1757,7 +1757,7 @@ static const struct message WmShowCustomDialogSeq[] = { { WM_IME_SETCONTEXT, sent|parent|wparam|optional, 0 }, { WM_IME_SETCONTEXT, sent|wparam|optional, 1 }, { WM_IME_NOTIFY, sent|wparam|defwinproc|optional, 2 },
- { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam|winevent_hook_todo, OBJID_CLIENT, 0 },
- { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 }, { WM_SETFOCUS, sent }, { WM_GETDLGCODE, sent|defwinproc|wparam, 0 }, { WM_NCPAINT, sent|wparam, 1 },
@@ -1770,7 +1770,7 @@ static const struct message WmShowCustomDialogSeq[] = { static const struct message WmModalDialogSeq[] = { { WM_CANCELMODE, sent|parent }, { HCBT_SETFOCUS, hook },
- { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam|winevent_hook_todo, OBJID_CLIENT, 0 },
- { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 }, { WM_KILLFOCUS, sent|parent }, { WM_IME_SETCONTEXT, sent|parent|wparam|optional, 0 }, { EVENT_OBJECT_STATECHANGE, winevent_hook|wparam|lparam|winevent_hook_todo, 0, 0 },
@@ -1843,7 +1843,7 @@ static const struct message WmModalDialogSeq[] = { { WM_WINDOWPOSCHANGED, sent|optional }, { HCBT_SETFOCUS, hook }, { WM_IME_SETCONTEXT, sent|parent|wparam|defwinproc|optional, 1 },
- { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam|winevent_hook_todo, OBJID_CLIENT, 0 },
- { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 }, { WM_SETFOCUS, sent|parent|defwinproc }, { EVENT_SYSTEM_DIALOGEND, winevent_hook|wparam|lparam|winevent_hook_todo, 0, 0 }, { HCBT_DESTROYWND, hook },
@@ -1856,7 +1856,7 @@ static const struct message WmModalDialogSeq[] = { static const struct message WmModalDialogSeq_2[] = { { WM_CANCELMODE, sent }, { HCBT_SETFOCUS, hook },
- { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam|winevent_hook_todo, OBJID_CLIENT, 0 },
- { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 }, { WM_KILLFOCUS, sent }, { WM_IME_SETCONTEXT, sent|parent|wparam|optional, 0 }, { EVENT_OBJECT_STATECHANGE, winevent_hook|wparam|lparam|winevent_hook_todo, 0, 0 },
@@ -2150,7 +2150,7 @@ static const struct message WmTrackPopupMenuMinimizeWindow[] = { { WM_ENTERIDLE, sent|wparam, 2 }, { HCBT_MINMAX, hook }, { HCBT_SETFOCUS, hook },
- { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam|winevent_hook_todo, OBJID_CLIENT, 0 },
- { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 }, { WM_KILLFOCUS, sent|wparam, 0 }, { WM_GETTEXT, sent|optional }, { WM_WINDOWPOSCHANGING, sent },
@@ -3055,7 +3055,7 @@ static const struct message WmCreateMDIchildVisibleSeq[] = { { WM_KILLFOCUS, sent }, /* in MDI client */ { WM_IME_SETCONTEXT, sent|wparam|optional, 0 }, /* in MDI client */ { WM_IME_SETCONTEXT, sent|wparam|defwinproc|optional, 1 },
- { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam|winevent_hook_todo, OBJID_CLIENT, 0 },
- { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 }, { WM_SETFOCUS, sent|defwinproc }, { WM_MDIACTIVATE, sent|defwinproc }, { 0 }
@@ -3076,11 +3076,11 @@ static const struct message WmChildActivateWindowSeq[] = { { WM_NCACTIVATE, sent|wparam|defwinproc, 1 }, { HCBT_SETFOCUS, hook }, { WM_KILLFOCUS, sent|defwinproc },
- { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam|winevent_hook_todo, OBJID_CLIENT, 0 },
- { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 }, { WM_SETFOCUS, sent }, { HCBT_SETFOCUS, hook }, { WM_KILLFOCUS, sent },
- { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam|winevent_hook_todo, OBJID_CLIENT, 0 },
- { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 }, { WM_SETFOCUS, sent|defwinproc }, { WM_MDIACTIVATE, sent|defwinproc }, { 0 }
@@ -3115,7 +3115,7 @@ static const struct message WmCreateMDIchildInvisibleParentSeq[] = { { WM_KILLFOCUS, sent }, /* in MDI client */ { WM_IME_SETCONTEXT, sent|wparam|optional, 0 }, /* in MDI client */ { WM_IME_SETCONTEXT, sent|wparam|defwinproc|optional, 1 },
- { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam|winevent_hook_todo, OBJID_CLIENT, 0 },
- { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 }, { WM_SETFOCUS, sent|defwinproc }, { WM_MDIACTIVATE, sent|defwinproc }, { 0 }
@@ -3144,14 +3144,14 @@ static const struct message WmDestroyMDIchildVisibleSeq[] = { { WM_KILLFOCUS, sent }, { WM_IME_SETCONTEXT, sent|wparam|optional, 0 }, { WM_IME_SETCONTEXT, sent|wparam|optional, 1 }, /* in MDI client */
- { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam|winevent_hook_todo, OBJID_CLIENT, 0 },
{ EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 }, { WM_SETFOCUS, sent }, /* in MDI client */
{ HCBT_SETFOCUS, hook }, /* MDI client sets focus back to MDI child */ { WM_KILLFOCUS, sent }, /* in MDI client */ { WM_IME_SETCONTEXT, sent|wparam|optional, 0 }, /* in MDI client */ { WM_IME_SETCONTEXT, sent|wparam|optional, 1 },
- { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam|winevent_hook_todo, OBJID_CLIENT, 0 },
{ EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 }, { WM_SETFOCUS, sent }, /* in MDI client */
{ EVENT_OBJECT_DESTROY, winevent_hook|wparam|lparam|winevent_hook_todo, 0, 0 },
@@ -3160,14 +3160,14 @@ static const struct message WmDestroyMDIchildVisibleSeq[] = { { WM_KILLFOCUS, sent }, { WM_IME_SETCONTEXT, sent|wparam|optional, 0 }, { WM_IME_SETCONTEXT, sent|wparam|optional, 1 }, /* in MDI client */
- { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam|winevent_hook_todo, OBJID_CLIENT, 0 },
{ EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 }, { WM_SETFOCUS, sent }, /* in MDI client */
{ HCBT_SETFOCUS, hook }, /* MDI client sets focus back to MDI child */ { WM_KILLFOCUS, sent }, /* in MDI client */ { WM_IME_SETCONTEXT, sent|wparam|optional, 0 }, /* in MDI client */ { WM_IME_SETCONTEXT, sent|wparam|optional, 1 },
- { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam|winevent_hook_todo, OBJID_CLIENT, 0 },
{ EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 }, { WM_SETFOCUS, sent }, /* in MDI client */
{ WM_DESTROY, sent },
@@ -3176,14 +3176,14 @@ static const struct message WmDestroyMDIchildVisibleSeq[] = { { WM_KILLFOCUS, sent }, { WM_IME_SETCONTEXT, sent|wparam|optional, 0 }, { WM_IME_SETCONTEXT, sent|wparam|optional, 1 }, /* in MDI client */
- { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam|winevent_hook_todo, OBJID_CLIENT, 0 },
{ EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 }, { WM_SETFOCUS, sent }, /* in MDI client */
{ HCBT_SETFOCUS, hook }, /* MDI client sets focus back to MDI child */ { WM_KILLFOCUS, sent }, /* in MDI client */ { WM_IME_SETCONTEXT, sent|wparam|optional, 0 }, /* in MDI client */ { WM_IME_SETCONTEXT, sent|wparam|optional, 1 },
- { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam|winevent_hook_todo, OBJID_CLIENT, 0 },
{ EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 }, { WM_SETFOCUS, sent }, /* in MDI client */
{ WM_NCDESTROY, sent },
@@ -3265,13 +3265,13 @@ static const struct message WmCreateMDIchildVisibleMaxSeq1[] = { { HCBT_SETFOCUS, hook|optional }, /* 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|winevent_hook_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 */ { WM_IME_SETCONTEXT, sent|wparam|optional, 0 }, /* in MDI client */ { WM_IME_SETCONTEXT, sent|wparam|defwinproc|optional, 1 },
- { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam|winevent_hook_todo, OBJID_CLIENT, 0 },
- { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 }, { WM_SETFOCUS, sent|defwinproc|optional }, { WM_MDIACTIVATE, sent|defwinproc|optional }, /* in MDI frame */
@@ -3345,13 +3345,13 @@ static const struct message WmCreateMDIchildVisibleMaxSeq2[] = { { WM_KILLFOCUS, sent|defwinproc|optional }, /* in the 1st MDI child */ { WM_IME_SETCONTEXT, sent|wparam|defwinproc|optional, 0 }, /* in the 1st MDI child */ { WM_IME_SETCONTEXT, sent|wparam|optional, 1 }, /* in MDI client */
- { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam|winevent_hook_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 */ { WM_IME_SETCONTEXT, sent|wparam|optional, 0 }, /* in MDI client */ { WM_IME_SETCONTEXT, sent|wparam|defwinproc|optional, 1 },
- { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam|winevent_hook_todo, OBJID_CLIENT, 0 },
{ EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 }, { WM_SETFOCUS, sent|defwinproc },
{ WM_MDIACTIVATE, sent|defwinproc },
@@ -3417,7 +3417,7 @@ static const struct message WmCreateMDIchildVisibleMaxSeq3[] = { { WM_KILLFOCUS, sent }, /* in MDI client */ { WM_IME_SETCONTEXT, sent|wparam|optional, 0 }, /* in MDI client */ { WM_IME_SETCONTEXT, sent|wparam|defwinproc|optional, 1 },
- { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam|winevent_hook_todo, OBJID_CLIENT, 0 },
{ EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 }, { WM_SETFOCUS, sent|defwinproc },
{ WM_MDIACTIVATE, sent|defwinproc },
@@ -3556,13 +3556,13 @@ static const struct message WmDestroyMDIchildVisibleMaxSeq2[] = { { WM_KILLFOCUS, sent|defwinproc }, { WM_IME_SETCONTEXT, sent|wparam|defwinproc|optional, 0 }, { WM_IME_SETCONTEXT, sent|wparam|optional, 1 }, /* in MDI client */
- { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam|winevent_hook_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 */ { WM_IME_SETCONTEXT, sent|wparam|optional, 0 }, /* in MDI client */ { WM_IME_SETCONTEXT, sent|wparam|defwinproc|optional, 1 },
- { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam|winevent_hook_todo, OBJID_CLIENT, 0 },
- { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 }, { WM_SETFOCUS, sent|defwinproc }, { WM_MDIACTIVATE, sent|defwinproc }, { WM_WINDOWPOSCHANGED, sent|wparam|defwinproc, SWP_NOSIZE|SWP_NOMOVE|SWP_NOREDRAW|SWP_NOCLIENTSIZE|SWP_NOCLIENTMOVE },
@@ -3606,13 +3606,13 @@ static const struct message WmDestroyMDIchildVisibleMaxSeq1[] = { { WM_KILLFOCUS, sent }, { WM_IME_SETCONTEXT, sent|wparam|optional, 0 }, { WM_IME_SETCONTEXT, sent|wparam|optional, 1 }, /* in MDI client */
- { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam|winevent_hook_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 */ { WM_IME_SETCONTEXT, sent|wparam|optional, 0 }, /* in MDI client */ { WM_IME_SETCONTEXT, sent|wparam|optional, 1 },
- { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam|winevent_hook_todo, OBJID_CLIENT, 0 },
{ EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 }, { WM_SETFOCUS, sent },
/* in MDI child */
@@ -3738,7 +3738,7 @@ static const struct message WmDestroyMDIchildVisibleMaxSeq1[] = { { WM_KILLFOCUS, sent }, { WM_IME_SETCONTEXT, sent|wparam|optional, 0 }, { WM_IME_SETCONTEXT, sent|wparam|optional, 1 }, /* in MDI client */
- { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam|winevent_hook_todo, OBJID_CLIENT, 0 },
{ EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 }, { WM_SETFOCUS, sent }, /* in MDI client */
{ WM_MDIREFRESHMENU, sent }, /* in MDI client */
@@ -3782,7 +3782,7 @@ static const struct message WmMaximizeMDIchildInvisibleSeq[] = { { WM_KILLFOCUS, sent|optional }, /* in MDI client */ { WM_IME_SETCONTEXT, sent|wparam|optional, 0 }, /* in MDI client */ { WM_IME_SETCONTEXT, sent|wparam|defwinproc|optional, 1 },
- { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam|winevent_hook_todo, OBJID_CLIENT, 0 },
- { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 }, { WM_SETFOCUS, sent|optional|defwinproc }, { WM_MDIACTIVATE, sent|optional|defwinproc }, { WM_WINDOWPOSCHANGED, sent|wparam, SWP_SHOWWINDOW|SWP_FRAMECHANGED|SWP_NOMOVE|SWP_NOCLIENTMOVE|SWP_STATECHANGED },
@@ -3815,7 +3815,7 @@ static const struct message WmMaximizeMDIchildInvisibleSeq2[] = { { WM_KILLFOCUS, sent|optional }, /* in MDI client */ { WM_IME_SETCONTEXT, sent|wparam|optional, 0 }, /* in MDI client */ { WM_IME_SETCONTEXT, sent|wparam|defwinproc|optional, 1 },
- { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam|winevent_hook_todo, OBJID_CLIENT, 0 },
- { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 }, { WM_SETFOCUS, sent|defwinproc|optional }, { WM_MDIACTIVATE, sent|defwinproc|optional }, { WM_WINDOWPOSCHANGED, sent|wparam, SWP_SHOWWINDOW|SWP_FRAMECHANGED|SWP_NOSIZE|SWP_NOMOVE|SWP_NOCLIENTSIZE|SWP_NOCLIENTMOVE, 0, SWP_STATECHANGED /* w1064v1809 */ },
@@ -5322,7 +5322,7 @@ static const struct message WmZOrder[] = { { 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|winevent_hook_todo, OBJID_CLIENT, 0 },
- { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 }, { WM_SETFOCUS, sent|wparam|defwinproc, 0 }, { WM_WINDOWPOSCHANGED, sent|wparam, SWP_NOSIZE|SWP_NOMOVE|SWP_NOREDRAW|SWP_NOCLIENTSIZE|SWP_NOCLIENTMOVE }, { WM_GETTEXT, sent|optional },
@@ -7282,7 +7282,7 @@ static const struct message auto_radio_button_VK_DOWN_dialog[] = { WM_KILLFOCUS, sent, 0, 0 }, { WM_CTLCOLORSTATIC, sent|parent }, { WM_COMMAND, sent|wparam|parent, MAKEWPARAM(ID_RADIO3, BN_KILLFOCUS) },
- { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam|winevent_hook_todo, OBJID_CLIENT, 0 },
- { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 }, { WM_SETFOCUS, sent, 0, 0 }, { WM_CTLCOLORSTATIC, sent|parent }, { WM_COMMAND, sent|wparam|parent, MAKEWPARAM(ID_RADIO1, BN_SETFOCUS) },
@@ -11927,7 +11927,7 @@ static const struct message sl_edit_invisible[] = { WM_IME_NOTIFY, sent|wparam|defwinproc|optional, 2 }, { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam|optional, OBJID_CLIENT, 0 }, /* Sent for IME. */ { WM_KILLFOCUS, sent|parent },
- { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam|winevent_hook_todo, OBJID_CLIENT, 0 },
- { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 }, { WM_SETFOCUS, sent }, { EVENT_OBJECT_CREATE, winevent_hook|wparam|lparam|winevent_hook_todo, OBJID_CARET, 0 }, { EVENT_OBJECT_SHOW, winevent_hook|wparam|lparam|winevent_hook_todo, OBJID_CARET, 0 },
@@ -14283,7 +14283,7 @@ static const struct message WmCreateDialogParamSeq_4[] = { { WM_NCACTIVATE, sent|parent }, { WM_ACTIVATE, sent|parent|wparam, 1 }, { HCBT_SETFOCUS, hook },
- { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam|winevent_hook_todo, OBJID_CLIENT, 0 },
- { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 }, { WM_SETFOCUS, sent|parent }, { WM_KILLFOCUS, sent|parent }, { WM_SETFOCUS, sent },
@@ -14482,7 +14482,7 @@ static void test_enddialog_seq(HWND dialog, HWND owner) { WM_ACTIVATE, sent|wparam|lparam, WA_ACTIVE, (LPARAM)dialog }, { HCBT_SETFOCUS, hook|wparam, (WPARAM)owner }, { WM_KILLFOCUS, sent|wparam, (WPARAM)owner },
{ EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam|winevent_hook_todo, OBJID_CLIENT, 0 },
};{ EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 }, { WM_SETFOCUS, sent|defwinproc|wparam, (WPARAM)dialog }, { 0 }
@@ -14506,7 +14506,7 @@ static void test_enddialog_seq2(HWND dialog, HWND owner) { WM_WINDOWPOSCHANGING, sent|optional|wparam, SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE }, { HCBT_SETFOCUS, hook|wparam, (WPARAM)owner }, { WM_KILLFOCUS, sent|wparam, (WPARAM)owner },
{ EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam|winevent_hook_todo, OBJID_CLIENT, 0 },
};{ EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 }, { WM_SETFOCUS, sent|parent|defwinproc|wparam, (WPARAM)dialog }, { 0 }
@@ -14703,7 +14703,7 @@ static const struct message SetActiveWindowSeq2[] = { WM_IME_SETCONTEXT, sent|wparam|defwinproc|optional, 1 }, { WM_IME_NOTIFY, sent|wparam|defwinproc|optional, 1 }, { WM_IME_NOTIFY, sent|wparam|defwinproc|optional, 2 },
- { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam|winevent_hook_todo, OBJID_CLIENT, 0 },
- { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 }, { WM_SETFOCUS, sent|defwinproc }, { WM_GETTEXT, sent|optional }, { 0 }
@@ -14726,7 +14726,7 @@ static const struct message SetActiveWindowSeq3[] = { 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|winevent_hook_todo, OBJID_CLIENT, 0 },
- { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 }, { WM_SETFOCUS, sent|defwinproc }, { 0 }
}; @@ -14752,7 +14752,7 @@ static const struct message SetActiveWindowSeq4[] = { WM_IME_SETCONTEXT, sent|wparam|defwinproc|optional, 1 }, { WM_IME_NOTIFY, sent|wparam|defwinproc|optional, 1 }, { WM_IME_NOTIFY, sent|wparam|defwinproc|optional, 2 },
- { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam|winevent_hook_todo, OBJID_CLIENT, 0 },
- { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 }, { WM_SETFOCUS, sent|defwinproc }, { 0 }
}; @@ -15312,7 +15312,7 @@ static const struct message wm_lb_click_0[] = { WM_KILLFOCUS, sent|parent }, { WM_IME_SETCONTEXT, sent|wparam|optional|parent, 0 }, { WM_IME_SETCONTEXT, sent|wparam|defwinproc|optional, 1 },
- { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam|winevent_hook_todo, OBJID_CLIENT, 0 },
{ EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 }, { WM_SETFOCUS, sent|defwinproc },
{ WM_DRAWITEM, sent|wparam|lparam|parent, ID_LISTBOX, 0x001142f2 },
@@ -16085,7 +16085,7 @@ static const struct message WmRestoreMinimizedOverlappedSeq[] = { WM_GETTEXT, sent|defwinproc|optional }, { WM_ACTIVATE, sent|wparam, TRUE }, { HCBT_SETFOCUS, hook },
- { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam|winevent_hook_todo, OBJID_CLIENT, 0 },
- { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 }, { WM_SETFOCUS, sent|defwinproc }, { WM_NCPAINT, sent }, { WM_GETTEXT, sent|defwinproc|optional },
@@ -16138,7 +16138,7 @@ static const struct message WmRestoreActiveMinimizedOverlappedSeq[] = { EVENT_OBJECT_LOCATIONCHANGE, winevent_hook|wparam|lparam|optional, 0, 0 }, /* Win7 seems to send this twice. */ { EVENT_SYSTEM_MINIMIZEEND, winevent_hook|wparam|lparam|winevent_hook_todo, 0, 0 }, { HCBT_SETFOCUS, hook },
- { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam|winevent_hook_todo, OBJID_CLIENT, 0 },
- { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 }, { WM_SETFOCUS, sent }, /* Note this WM_ACTIVATE messages even if the window is already active */ { WM_ACTIVATE, sent|wparam|lparam, WA_ACTIVE, 0 },
@@ -17072,7 +17072,7 @@ static const struct message WmSetParentSeq_2[] = { { WM_NCACTIVATE, sent|wparam|optional, 0 }, { WM_ACTIVATE, sent|wparam|optional, 0 }, { WM_ACTIVATEAPP, sent|wparam|optional, 0 },
- { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam|winevent_hook_todo, OBJID_CLIENT, 0 },
- { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 }, { WM_KILLFOCUS, sent|wparam, 0 }, { EVENT_OBJECT_PARENTCHANGE, winevent_hook|wparam|lparam|winevent_hook_todo, 0, 0 }, { WM_WINDOWPOSCHANGING, sent|wparam, SWP_NOSIZE },
@@ -17739,17 +17739,17 @@ static const struct message WmSetFocus_1[] = { { WM_GETTEXT, sent|defwinproc|parent|optional }, { WM_ACTIVATE, sent|wparam|parent, 1 }, { HCBT_SETFOCUS, hook }, /* parent */
- { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam|winevent_hook_todo, OBJID_CLIENT, 0 },
- { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 }, { WM_SETFOCUS, sent|defwinproc|parent }, { WM_KILLFOCUS, sent|parent },
- { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam|winevent_hook_todo, OBJID_CLIENT, 0 },
- { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 }, { WM_SETFOCUS, sent }, { 0 }
}; static const struct message WmSetFocus_2[] = { { HCBT_SETFOCUS, hook }, /* parent */ { WM_KILLFOCUS, sent },
- { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam|winevent_hook_todo, OBJID_CLIENT, 0 },
- { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 }, { WM_SETFOCUS, sent|parent }, { 0 }
}; @@ -18600,7 +18600,7 @@ static const struct message WmRestoreMinimizedSeq[] = { WM_NCPAINT, sent|wparam|defwinproc|optional, 1 }, { WM_ERASEBKGND, sent|defwinproc|optional }, { HCBT_SETFOCUS, hook },
- { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam|winevent_hook_todo, OBJID_CLIENT, 0 },
- { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 }, { WM_SETFOCUS, sent|defwinproc }, { WM_ACTIVATE, sent|wparam|defwinproc, 1 }, { WM_PAINT, sent| optional },
-- 2.34.1
On Sun, Nov 28, 2021 at 1:59 PM Connor McAdams conmanx360@gmail.com wrote:
Hi, are you sure this doesn't introduce new failures on wine, WRT HCBT_SETFOCUS hooks? I sent a patch for this back in October, and it had issues with those. https://www.winehq.org/pipermail/wine-devel/2021-October/197568.html
Thanks for the link, I wasn't aware of your previous patches for this issue. My patch is not as ambitious as yours: It only sends EVENT_OBJECT_FOCUS in one place, and only if another window previously had focus. I didn't do anything more comprehensive precisely because I wanted to be sure that the patch wouldn't break any tests.
-Alex
Yeah, I guess the question is whether or not that's acceptable upstream, which I'm not really qualified to answer.
At the very least, if it's going to be partially implemented, the title/commit message should probably mention this, i.e 'Partially implement EVENT_OBJECT_FOCUS events.' or something along those lines.
On Sun, Nov 28, 2021 at 8:37 PM Alex Henrie alexhenrie24@gmail.com wrote:
On Sun, Nov 28, 2021 at 1:59 PM Connor McAdams conmanx360@gmail.com wrote:
Hi, are you sure this doesn't introduce new failures on wine, WRT HCBT_SETFOCUS hooks? I sent a patch for this back in October, and it had issues with those. https://www.winehq.org/pipermail/wine-devel/2021-October/197568.html
Thanks for the link, I wasn't aware of your previous patches for this issue. My patch is not as ambitious as yours: It only sends EVENT_OBJECT_FOCUS in one place, and only if another window previously had focus. I didn't do anything more comprehensive precisely because I wanted to be sure that the patch wouldn't break any tests.
-Alex
Hi,
While running your changed tests, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check?
Full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=102886
Your paranoid android.
=== w864 (64 bit report) ===
user32: msg.c:15240: Test failed: unexpected message 31f msg.c:15241: Test failed: bad wparam 1 msg.c:15247: Test failed: unicode WM_CHAR: 0: the msg sequence is not complete: expected 0102 - actual 0000
=== debiant2 (32 bit Arabic:Morocco report) ===
user32: msg.c:9208: Test failed: WaitForSingleObject failed 102 msg.c:9214: Test failed: destroy child on thread exit: 0: the msg 0x0082 was expected, but got msg 0x000f instead msg.c:9214: Test failed: destroy child on thread exit: 1: the msg 0x000f was expected, but got msg 0x0014 instead msg.c:9214: Test failed: destroy child on thread exit: 2: the msg sequence is not complete: expected 0014 - actual 0000