user32/listbox: Fix redraw after LB_SETCOUNT message.
3ef790b968
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=51591 Signed-off-by: Akihiro Sagawa <sagawa.aki@gmail.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org> (cherry picked from commit247185ba78
) Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
This commit is contained in:
parent
b823fa1a3a
commit
904ad1e120
|
@ -1839,6 +1839,8 @@ static LRESULT LISTBOX_SetCount( LB_DESCR *descr, UINT count )
|
||||||
if (!resize_storage(descr, count))
|
if (!resize_storage(descr, count))
|
||||||
return LB_ERRSPACE;
|
return LB_ERRSPACE;
|
||||||
descr->nb_items = count;
|
descr->nb_items = count;
|
||||||
|
if (descr->style & LBS_NOREDRAW)
|
||||||
|
descr->style |= LBS_DISPLAYCHANGED;
|
||||||
|
|
||||||
if (count)
|
if (count)
|
||||||
{
|
{
|
||||||
|
|
|
@ -447,7 +447,6 @@ static void test_ownerdraw(void)
|
||||||
got_drawitem = 0;
|
got_drawitem = 0;
|
||||||
ret = RedrawWindow(hLB, NULL, 0, RDW_UPDATENOW);
|
ret = RedrawWindow(hLB, NULL, 0, RDW_UPDATENOW);
|
||||||
ok(ret, "RedrawWindow failed\n");
|
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);
|
ok(got_drawitem == testcase[i].drawitem, "expected %u, got %u\n", testcase[i].drawitem, got_drawitem);
|
||||||
|
|
||||||
DestroyWindow(hLB);
|
DestroyWindow(hLB);
|
||||||
|
|
Loading…
Reference in New Issue