Commit 247185ba authored by Akihiro Sagawa's avatar Akihiro Sagawa Committed by Alexandre Julliard

user32/listbox: Fix redraw after LB_SETCOUNT message.

3ef790b9 accidentally dropped updating LBS_DISPLAYCHANGED flag that had been done in LISTBOX_InvalidateItems() if the count value was changed. In fact, the newly added test shows LB_SETCOUNT message always causes WM_DRAWITEM requests regardless of the count value. Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=51591Signed-off-by: 's avatarAkihiro Sagawa <sagawa.aki@gmail.com> Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
parent a70ed810
......@@ -1839,6 +1839,8 @@ static LRESULT LISTBOX_SetCount( LB_DESCR *descr, UINT count )
if (!resize_storage(descr, count))
return LB_ERRSPACE;
descr->nb_items = count;
if (descr->style & LBS_NOREDRAW)
descr->style |= LBS_DISPLAYCHANGED;
if (count)
{
......
......@@ -447,7 +447,6 @@ static void test_ownerdraw(void)
got_drawitem = 0;
ret = RedrawWindow(hLB, NULL, 0, RDW_UPDATENOW);
ok(ret, "RedrawWindow failed\n");
todo_wine_if(testcase[i].message == LB_SETCOUNT)
ok(got_drawitem == testcase[i].drawitem, "expected %u, got %u\n", testcase[i].drawitem, got_drawitem);
DestroyWindow(hLB);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment