Invalidate the focus rect when a listbox is resized.
diff --git a/controls/listbox.c b/controls/listbox.c index f6f3d41..aa63fa7 100644 --- a/controls/listbox.c +++ b/controls/listbox.c
@@ -112,6 +112,8 @@ static LRESULT WINAPI ComboLBWndProcA( HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam ); static LRESULT WINAPI ListBoxWndProcA( HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam ); +static LRESULT LISTBOX_GetItemRect( WND *wnd, LB_DESCR *descr, INT index, + RECT *rect ); /********************************************************************* * listbox class descriptor @@ -409,6 +411,12 @@ wnd->hwndSelf, descr->width, descr->height ); LISTBOX_UpdatePage( wnd, descr ); LISTBOX_UpdateScroll( wnd, descr ); + + /* Invalidate the focused item so it will be repainted correctly */ + if (1==LISTBOX_GetItemRect( wnd, descr, descr->focus_item, &rect )) + { + InvalidateRect( wnd->hwndSelf, &rect, FALSE ); + } }