mirror of
https://github.com/reactos/wine.git
synced 2024-11-25 04:39:45 +00:00
comctl32: header: Don't try to draw items outside the clipping rect.
This commit is contained in:
parent
64e5779c16
commit
b8da6f2751
@ -466,8 +466,10 @@ HEADER_Refresh (HWND hwnd, HDC hdc)
|
||||
|
||||
x = rect.left;
|
||||
for (i = 0; x <= rect.right && i < infoPtr->uNumItem; i++) {
|
||||
x = HEADER_DrawItem (hwnd, hdc, HEADER_OrderToIndex(hwnd,i),
|
||||
infoPtr->iHotItem == i);
|
||||
int idx = HEADER_OrderToIndex(hwnd,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)) {
|
||||
|
Loading…
Reference in New Issue
Block a user