Zhiyi Zhang : comctl32: Remove unnecessary OffsetRect() calls.
Alexandre Julliard
julliard at winehq.org
Mon Mar 1 15:54:04 CST 2021
Module: wine
Branch: master
Commit: c1395d9255e1a5a9db37c3520fc6d0f7c6563e38
URL: https://source.winehq.org/git/wine.git/?a=commit;h=c1395d9255e1a5a9db37c3520fc6d0f7c6563e38
Author: Zhiyi Zhang <zzhang at codeweavers.com>
Date: Mon Mar 1 11:10:09 2021 +0800
comctl32: Remove unnecessary OffsetRect() calls.
Target rectangles are already offset by previous OffsetRect() calls.
Signed-off-by: Zhiyi Zhang <zzhang at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
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 a4bca2f9306..05920893c93 100644
--- a/dlls/comctl32/edit.c
+++ b/dlls/comctl32/edit.c
@@ -3664,7 +3664,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);
More information about the wine-cvs
mailing list