[PATCH] Listview scroll

Gerard Patel gerard.patel at nerim.net
Wed Jan 30 16:49:29 CST 2002


ChangeLog:

	* dlls/comctl32/listview.c
                Don't repaint header when scrolling a listview vertically
-------------- next part --------------
Index: dlls/comctl32/listview.c
===================================================================
RCS file: /home/wine/wine/dlls/comctl32/listview.c,v
retrieving revision 1.111
diff -u -r1.111 listview.c
--- dlls/comctl32/listview.c	2002/01/29 17:51:00	1.111
+++ dlls/comctl32/listview.c	2002/01/30 19:42:50
@@ -7564,7 +7564,17 @@
     {
       scrollInfo.fMask = SIF_POS;
       SetScrollInfo(hwnd, SB_VERT, &scrollInfo, TRUE);
-      InvalidateRect(hwnd, NULL, TRUE);
+      if (IsWindowVisible(infoPtr->hwndHeader))
+      {
+        RECT rListview, rcHeader, rDest;
+        GetClientRect(hwnd, &rListview);
+        GetWindowRect(infoPtr->hwndHeader, &rcHeader);
+        MapWindowPoints((HWND) NULL, hwnd, (LPPOINT) &rcHeader, 2);
+        SubtractRect(&rDest, &rListview, &rcHeader);
+        InvalidateRect(hwnd, &rDest, TRUE);
+      }
+      else
+        InvalidateRect(hwnd, NULL, TRUE);
     }
   }
     
-------------- next part --------------



More information about the wine-patches mailing list