Use a ClipRegion when collapsing, so that the TreeView works correctly.
authorColin Finck <colin@reactos.org>
Sun, 15 Jun 2008 16:05:39 +0000 (16:05 +0000)
committerColin Finck <colin@reactos.org>
Sun, 15 Jun 2008 16:05:39 +0000 (16:05 +0000)
This patch has already been submitted to Wine, but as they don't care currently, I applied it manually here and updated "comctl32_ros.diff" accordingly.

Patch by Timo Kreuzer

svn path=/trunk/; revision=33985

reactos/dll/win32/comctl32/comctl32_ros.diff
reactos/dll/win32/comctl32/treeview.c

index 2adfdd7..c25767a 100644 (file)
@@ -123,8 +123,8 @@ Index: tooltips.c
  
 Index: treeview.c
 ===================================================================
---- treeview.c (revision 27134)
-+++ treeview.c (working copy)
+--- D:/Wine-CVS/wine/dlls/comctl32/treeview.c  Sun Jun 15 18:29:21 2008
++++ D:/ReactOS-Trunk/reactos/dll/win32/comctl32/treeview.c     Sun Jun 15 18:27:14 2008
 @@ -2826,8 +2826,6 @@
        }
      }
@@ -134,3 +134,12 @@ Index: treeview.c
      if (infoPtr->cdmode & CDRF_NOTIFYPOSTPAINT)
        infoPtr->cdmode =
            TREEVIEW_SendCustomDrawNotify(infoPtr, CDDS_POSTPAINT, hdc, rect);
+@@ -3209,7 +3207,7 @@
+     {
+         scrollRect.top = nextItem->rect.top;
+-        ScrollWindowEx (infoPtr->hwnd, 0, scrollDist, &scrollRect, NULL,
++        ScrollWindowEx (infoPtr->hwnd, 0, scrollDist, &scrollRect, &scrollRect,
+                        NULL, NULL, SW_ERASE | SW_INVALIDATE);
+         TREEVIEW_Invalidate(infoPtr, wineItem);
+     } else {
index 84b23f5..e242880 100644 (file)
@@ -3207,7 +3207,7 @@ TREEVIEW_Collapse(TREEVIEW_INFO *infoPtr, TREEVIEW_ITEM *wineItem,
     {
         scrollRect.top = nextItem->rect.top;
 
-        ScrollWindowEx (infoPtr->hwnd, 0, scrollDist, &scrollRect, NULL,
+        ScrollWindowEx (infoPtr->hwnd, 0, scrollDist, &scrollRect, &scrollRect,
                        NULL, NULL, SW_ERASE | SW_INVALIDATE);
         TREEVIEW_Invalidate(infoPtr, wineItem);
     } else {