[PATCH 3/5] comctl32/status: Remove redundant background drawing code.

Zhiyi Zhang zzhang at codeweavers.com
Thu Jan 20 01:17:39 CST 2022


The part background is already painted in STATUSBAR_Refresh().

Signed-off-by: Zhiyi Zhang <zzhang at codeweavers.com>
---
 dlls/comctl32/status.c | 20 --------------------
 1 file changed, 20 deletions(-)

diff --git a/dlls/comctl32/status.c b/dlls/comctl32/status.c
index ac93d7712c0..786fcbd291d 100644
--- a/dlls/comctl32/status.c
+++ b/dlls/comctl32/status.c
@@ -191,9 +191,6 @@ STATUSBAR_DrawPart (const STATUS_INFO *infoPtr, HDC hdc, const STATUSWINDOWPART
 static void
 STATUSBAR_RefreshPart (const STATUS_INFO *infoPtr, HDC hdc, const STATUSWINDOWPART *part, int itemID)
 {
-    HBRUSH hbrBk;
-    HTHEME theme;
-
     TRACE("item %d\n", itemID);
 
     if (part->bound.right < part->bound.left) return;
@@ -201,23 +198,6 @@ STATUSBAR_RefreshPart (const STATUS_INFO *infoPtr, HDC hdc, const STATUSWINDOWPA
     if (!RectVisible(hdc, &part->bound))
         return;
 
-    if ((theme = GetWindowTheme (infoPtr->Self)))
-    {
-        RECT cr;
-        GetClientRect (infoPtr->Self, &cr);
-        DrawThemeBackground(theme, hdc, 0, 0, &cr, &part->bound);
-    }
-    else
-    {
-        if (infoPtr->clrBk != CLR_DEFAULT)
-                hbrBk = CreateSolidBrush (infoPtr->clrBk);
-        else
-                hbrBk = GetSysColorBrush (COLOR_3DFACE);
-        FillRect(hdc, &part->bound, hbrBk);
-        if (infoPtr->clrBk != CLR_DEFAULT)
-                DeleteObject (hbrBk);
-    }
-
     STATUSBAR_DrawPart (infoPtr, hdc, part, itemID);
 }
 
-- 
2.32.0




More information about the wine-devel mailing list