Commit 428d298a authored by Francois Boisvert's avatar Francois Boisvert Committed by Alexandre Julliard

Prevented LISTBOX_RepaintItem from repainting a non visible item.

parent 9caedbd9
...@@ -565,7 +565,9 @@ static void LISTBOX_RepaintItem( WND *wnd, LB_DESCR *descr, INT index, ...@@ -565,7 +565,9 @@ static void LISTBOX_RepaintItem( WND *wnd, LB_DESCR *descr, INT index,
HFONT oldFont = 0; HFONT oldFont = 0;
HBRUSH hbrush, oldBrush = 0; HBRUSH hbrush, oldBrush = 0;
if (descr->style & LBS_NOREDRAW) return; /* Do not repaint the item if the item is not visible */
if ((descr->style & LBS_NOREDRAW) || !IsWindowVisible(wnd->hwndSelf)) return;
if (LISTBOX_GetItemRect( wnd, descr, index, &rect ) != 1) return; if (LISTBOX_GetItemRect( wnd, descr, index, &rect ) != 1) return;
if (!(hdc = GetDCEx( wnd->hwndSelf, 0, DCX_CACHE ))) return; if (!(hdc = GetDCEx( wnd->hwndSelf, 0, DCX_CACHE ))) return;
if (descr->font) oldFont = SelectObject( hdc, descr->font ); if (descr->font) oldFont = SelectObject( hdc, descr->font );
......
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