From 13f1fb23fe0f9b70a53fd732b8f33cf98e5d77ca Mon Sep 17 00:00:00 2001
From: Ondrej Macek <xmacek@informatics.muni.cz>
Date: Tue, 19 Feb 2002 18:32:12 +0000
Subject: [PATCH] Fix of ListView invalidation in LISTVIEW_SetBkColor.

---
 dlls/comctl32/listview.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/dlls/comctl32/listview.c b/dlls/comctl32/listview.c
index 193a3118ae6..81e9ec16d45 100644
--- a/dlls/comctl32/listview.c
+++ b/dlls/comctl32/listview.c
@@ -6808,8 +6808,10 @@ static LRESULT LISTVIEW_SetBkColor(HWND hwnd, COLORREF clrBk)
 {
   LISTVIEW_INFO *infoPtr = (LISTVIEW_INFO *)GetWindowLongW(hwnd, 0);
 
-  infoPtr->clrBk = clrBk;
-  InvalidateRect(hwnd, NULL, TRUE);
+  if(infoPtr->clrBk!=clrBk){
+    infoPtr->clrBk = clrBk;
+    InvalidateRect(hwnd, NULL, TRUE);
+  }
   
   return TRUE;
 }
-- 
GitLab