From: Esme Povirk esme@codeweavers.com
--- dlls/user32/listbox.c | 2 ++ dlls/user32/tests/msg.c | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/dlls/user32/listbox.c b/dlls/user32/listbox.c index 943d6ce3e28..467a8c8a10b 100644 --- a/dlls/user32/listbox.c +++ b/dlls/user32/listbox.c @@ -2164,6 +2164,8 @@ static LRESULT LISTBOX_HandleLButtonDown( LB_DESCR *descr, DWORD keys, INT x, IN LISTBOX_MoveCaret( descr, index, FALSE ); LISTBOX_SetSelection( descr, index, TRUE, (descr->style & LBS_NOTIFY) != 0 ); + NtUserNotifyWinEvent( EVENT_OBJECT_FOCUS, descr->self, OBJID_CLIENT, index + 1 ); + NtUserNotifyWinEvent( EVENT_OBJECT_SELECTION, descr->self, OBJID_CLIENT, index + 1 ); }
if (!descr->lphc) diff --git a/dlls/user32/tests/msg.c b/dlls/user32/tests/msg.c index 965c99ff571..0347f0d73b0 100644 --- a/dlls/user32/tests/msg.c +++ b/dlls/user32/tests/msg.c @@ -16854,8 +16854,8 @@ static const struct message wm_lb_click_0[] = { WM_DRAWITEM, sent|wparam|lparam|parent, ID_LISTBOX, 0x000120f2 }, { WM_DRAWITEM, sent|wparam|lparam|parent, ID_LISTBOX, 0x001140f2 },
- { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam|msg_todo, OBJID_CLIENT, 1 }, - { EVENT_OBJECT_SELECTION, winevent_hook|wparam|lparam|msg_todo, OBJID_CLIENT, 1 }, + { EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_CLIENT, 1 }, + { EVENT_OBJECT_SELECTION, winevent_hook|wparam|lparam, OBJID_CLIENT, 1 },
{ WM_LBUTTONUP, sent|wparam|lparam, 0, 0 }, { EVENT_SYSTEM_CAPTUREEND, winevent_hook|wparam|lparam, 0, 0 },