Commit 66c1accb authored by Huw Davies's avatar Huw Davies Committed by Alexandre Julliard

Invalidate the focused item when scrolling horizontally so that it

repaints correctly.
parent 00c5250a
......@@ -1210,8 +1210,14 @@ static void LISTBOX_SetHorizontalPos( HWND hwnd, LB_DESCR *descr, INT pos )
descr->horz_pos = pos;
LISTBOX_UpdateScroll( hwnd, descr );
if (abs(diff) < descr->width)
{
RECT rect;
/* Invalidate the focused item so it will be repainted correctly */
if (LISTBOX_GetItemRect( descr, descr->focus_item, &rect ) == 1)
InvalidateRect( hwnd, &rect, TRUE );
ScrollWindowEx( hwnd, diff, 0, NULL, NULL, 0, NULL,
SW_INVALIDATE | SW_ERASE | SW_SCROLLCHILDREN );
}
else
InvalidateRect( hwnd, NULL, TRUE );
}
......
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