Use a ClipRegion when collapsing, so that the TreeView works correctly.

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
This commit is contained in:
Colin Finck 2008-06-15 16:05:39 +00:00
parent 6846255313
commit abae3b6913
2 changed files with 12 additions and 3 deletions

View 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 {

View 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 {