[PATCH 5/5] comctl32: Remove unnecessary OffsetRect() calls.
Zhiyi Zhang
zzhang at codeweavers.com
Sun Feb 28 21:10:09 CST 2021
Target rectangles are already offset by previous OffsetRect() calls.
Signed-off-by: Zhiyi Zhang <zzhang at codeweavers.com>
---
dlls/comctl32/edit.c | 1 -
dlls/comctl32/listbox.c | 1 -
dlls/comctl32/listview.c | 1 -
dlls/comctl32/treeview.c | 1 -
4 files changed, 4 deletions(-)
diff --git a/dlls/comctl32/edit.c b/dlls/comctl32/edit.c
index 4ad46357d96..06e0497ab98 100644
--- a/dlls/comctl32/edit.c
+++ b/dlls/comctl32/edit.c
@@ -3667,7 +3667,6 @@ static void EDIT_WM_NCPaint(HWND hwnd, HRGN region)
OffsetRect(&r, -r.left, -r.top);
dc = GetDCEx(hwnd, region, DCX_WINDOW|DCX_INTERSECTRGN);
- OffsetRect(&r, -r.left, -r.top);
if (IsThemeBackgroundPartiallyTransparent(theme, part, state))
DrawThemeParentBackground(hwnd, dc, &r);
diff --git a/dlls/comctl32/listbox.c b/dlls/comctl32/listbox.c
index 137b08ce678..239f54aafab 100644
--- a/dlls/comctl32/listbox.c
+++ b/dlls/comctl32/listbox.c
@@ -1211,7 +1211,6 @@ static LRESULT LISTBOX_NCPaint( LB_DESCR *descr, HRGN region )
OffsetRect(&r, -r.left, -r.top);
hdc = GetDCEx(descr->self, region, DCX_WINDOW|DCX_INTERSECTRGN);
- OffsetRect(&r, -r.left, -r.top);
if (IsThemeBackgroundPartiallyTransparent (theme, 0, 0))
DrawThemeParentBackground(descr->self, hdc, &r);
diff --git a/dlls/comctl32/listview.c b/dlls/comctl32/listview.c
index 0a05c0668ae..a62ac4398cc 100644
--- a/dlls/comctl32/listview.c
+++ b/dlls/comctl32/listview.c
@@ -10636,7 +10636,6 @@ static BOOL LISTVIEW_NCPaint(const LISTVIEW_INFO *infoPtr, HRGN region)
OffsetRect(&r, -r.left, -r.top);
dc = GetDCEx(infoPtr->hwndSelf, region, DCX_WINDOW|DCX_INTERSECTRGN);
- OffsetRect(&r, -r.left, -r.top);
if (IsThemeBackgroundPartiallyTransparent (theme, 0, 0))
DrawThemeParentBackground(infoPtr->hwndSelf, dc, &r);
diff --git a/dlls/comctl32/treeview.c b/dlls/comctl32/treeview.c
index 0e4a92a466f..a45096d8239 100644
--- a/dlls/comctl32/treeview.c
+++ b/dlls/comctl32/treeview.c
@@ -5459,7 +5459,6 @@ static BOOL TREEVIEW_NCPaint (const TREEVIEW_INFO *infoPtr, HRGN region, LPARAM
OffsetRect(&r, -r.left, -r.top);
dc = GetDCEx(infoPtr->hwnd, region, DCX_WINDOW|DCX_INTERSECTRGN);
- OffsetRect(&r, -r.left, -r.top);
if (IsThemeBackgroundPartiallyTransparent (theme, 0, 0))
DrawThemeParentBackground(infoPtr->hwnd, dc, &r);
--
2.27.0
More information about the wine-devel
mailing list