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 c2df4da5807..831327f2349 100644 --- a/dlls/user32/listbox.c +++ b/dlls/user32/listbox.c @@ -1736,6 +1736,8 @@ static LRESULT LISTBOX_RemoveItem( LB_DESCR *descr, INT index ) /* We need to invalidate the original rect instead of the updated one. */ LISTBOX_InvalidateItems( descr, index );
+ NtUserNotifyWinEvent( EVENT_OBJECT_DESTROY, descr->self, OBJID_CLIENT, index + 1 ); + if (descr->nb_items == 1) { SendMessageW(descr->self, LB_RESETCONTENT, 0, 0); diff --git a/dlls/user32/tests/msg.c b/dlls/user32/tests/msg.c index 25a7857d97c..4d0d643ef9f 100644 --- a/dlls/user32/tests/msg.c +++ b/dlls/user32/tests/msg.c @@ -16866,7 +16866,7 @@ static const struct message wm_lb_click_0[] = static const struct message wm_lb_deletestring[] = { { LB_DELETESTRING, sent|wparam|lparam, 0, 0 }, - { EVENT_OBJECT_DESTROY, winevent_hook|wparam|lparam|msg_todo, OBJID_CLIENT, 1 }, + { EVENT_OBJECT_DESTROY, winevent_hook|wparam|lparam, OBJID_CLIENT, 1 }, { WM_DELETEITEM, sent|wparam|parent|optional, ID_LISTBOX, 0 }, { WM_DRAWITEM, sent|wparam|parent|optional, ID_LISTBOX }, { WM_DRAWITEM, sent|wparam|parent|optional, ID_LISTBOX }, @@ -16875,7 +16875,7 @@ static const struct message wm_lb_deletestring[] = static const struct message wm_lb_deletestring_reset[] = { { LB_DELETESTRING, sent|wparam|lparam, 0, 0 }, - { EVENT_OBJECT_DESTROY, winevent_hook|wparam|lparam|msg_todo, OBJID_CLIENT, 1 }, + { EVENT_OBJECT_DESTROY, winevent_hook|wparam|lparam, OBJID_CLIENT, 1 }, { LB_RESETCONTENT, sent|wparam|lparam|defwinproc|optional, 0, 0 }, { WM_DELETEITEM, sent|wparam|parent|optional, ID_LISTBOX, 0 }, { WM_DRAWITEM, sent|wparam|parent|optional, ID_LISTBOX },