Commit b8da6f27 authored by Mikołaj Zalewski's avatar Mikołaj Zalewski Committed by Alexandre Julliard

comctl32: header: Don't try to draw items outside the clipping rect.

parent 64e5779c
...@@ -466,8 +466,10 @@ HEADER_Refresh (HWND hwnd, HDC hdc) ...@@ -466,8 +466,10 @@ HEADER_Refresh (HWND hwnd, HDC hdc)
x = rect.left; x = rect.left;
for (i = 0; x <= rect.right && i < infoPtr->uNumItem; i++) { for (i = 0; x <= rect.right && i < infoPtr->uNumItem; i++) {
x = HEADER_DrawItem (hwnd, hdc, HEADER_OrderToIndex(hwnd,i), int idx = HEADER_OrderToIndex(hwnd,i);
infoPtr->iHotItem == i); if (RectVisible(hdc, &infoPtr->items[idx].rect))
HEADER_DrawItem (hwnd, hdc, idx, infoPtr->iHotItem == i);
x = infoPtr->items[idx].rect.right;
} }
if ((x <= rect.right) && (infoPtr->uNumItem > 0)) { if ((x <= rect.right) && (infoPtr->uNumItem > 0)) {
......
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