comctl32/listview: Do not paint over header when handling WM_NCPAINT.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=52285 Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
ba47d8a2b4
commit
5f0dcf7918
|
@ -10537,8 +10537,8 @@ static LRESULT LISTVIEW_NCPaint(const LISTVIEW_INFO *infoPtr, HRGN region)
|
|||
{
|
||||
LONG exstyle = GetWindowLongW (infoPtr->hwndSelf, GWL_EXSTYLE);
|
||||
HTHEME theme = GetWindowTheme (infoPtr->hwndSelf);
|
||||
RECT r, window_rect;
|
||||
HDC dc;
|
||||
RECT r;
|
||||
HRGN cliprgn;
|
||||
int cxEdge = GetSystemMetrics (SM_CXEDGE),
|
||||
cyEdge = GetSystemMetrics (SM_CYEDGE);
|
||||
|
@ -10552,7 +10552,13 @@ static LRESULT LISTVIEW_NCPaint(const LISTVIEW_INFO *infoPtr, HRGN region)
|
|||
r.right - cxEdge, r.bottom - cyEdge);
|
||||
if (region != (HRGN)1)
|
||||
CombineRgn (cliprgn, cliprgn, region, RGN_AND);
|
||||
|
||||
OffsetRect(&r, -r.left, -r.top);
|
||||
if (infoPtr->hwndHeader && LISTVIEW_IsHeaderEnabled(infoPtr))
|
||||
{
|
||||
GetWindowRect(infoPtr->hwndHeader, &window_rect);
|
||||
r.top = min(r.bottom, r.top + window_rect.bottom - window_rect.top);
|
||||
}
|
||||
|
||||
dc = GetDCEx(infoPtr->hwndSelf, region, DCX_WINDOW|DCX_INTERSECTRGN);
|
||||
|
||||
|
|
Loading…
Reference in New Issue