A small fix of SetBkColor in ListView control

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi

This patch causes that after calling SetBkColor is the ListView control
invalidated only if the new color is different from the original. This
prevents some applications from cyclicaly redrawing the ListView window.

ChangeLog:
	dlls/comctl32/listview.c
	Ondrej Macek <xmacek@informatics.muni.cz>
	fix of ListView invalidation in LISTVIEW_SetBkColor

Ondřej Macek, <xmacek@informatics.muni.cz>


? patch.diff
Index: dlls/comctl32/listview.c
===================================================================
RCS file: /home/wine/wine/dlls/comctl32/listview.c,v
retrieving revision 1.116
diff -u -r1.116 listview.c
--- dlls/comctl32/listview.c	2002/02/12 18:42:25	1.116
+++ dlls/comctl32/listview.c	2002/02/17 21:01:49
@@ -6808,8 +6808,10 @@
 {
   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;
 }

[Index of Archives]     [Gimp for Windows]     [Red Hat]     [Samba]     [Yosemite Camping]     [Graphics Cards]     [Wine Home]

  Powered by Linux