yuxdwa702@sneakemail.com wrote:
Changelog: tinus yuxdwa702@sneakemail.com Scroll instead of repainting when expanding/collapsing trees Don't repaint on hover if 'hot tracking' isn't on
Index: dlls/comctl32/treeview.c
RCS file: /home/wine/wine/dlls/comctl32/treeview.c,v retrieving revision 1.164 diff -u -p -r1.164 treeview.c --- dlls/comctl32/treeview.c 14 Jan 2005 15:13:24 -0000 1.164 +++ dlls/comctl32/treeview.c 31 Jan 2005 01:51:30 -0000 @@ -631,7 +631,8 @@ TREEVIEW_SendCustomDrawItemNotify(TREEVI uItemState |= CDIS_SELECTED; if (wineItem == infoPtr->selectedItem) uItemState |= CDIS_FOCUS;
- if (wineItem == infoPtr->hotItem)
- /* I'm not sure of this, needs to be compared to the real thing */
Usually you find this out before submitting a patch.
- if ((infoPtr->dwStyle & TVS_TRACKSELECT) && wineItem ==
infoPtr->hotItem) uItemState |= CDIS_HOT; @@ -5037,11 +5107,13 @@ TREEVIEW_KeyDown(TREEVIEW_INFO *infoPtr, static LRESULT TREEVIEW_MouseLeave (TREEVIEW_INFO * infoPtr) {
- if (infoPtr->hotItem)
- HTREEITEM orgItem = infoPtr->hotItem;
- infoPtr->hotItem = NULL;
- /* remove hot effect from item */
- if (infoPtr->dwStyle & TVS_TRACKSELECT) {
/* remove hot effect from item */
InvalidateRect(infoPtr->hwnd, &infoPtr->hotItem->rect, TRUE);
infoPtr->hotItem = NULL;
} return 0;InvalidateRect(infoPtr->hwnd, &orgItem->rect, TRUE);
}
If hot tracking isn't required when TVS_TRACKSELECT isn't set, then don't call TrackMouseEvent, instead of putting these exceptions everywhere.
@@ -5080,11 +5152,11 @@ TREEVIEW_MouseMove (TREEVIEW_INFO * info if (item != infoPtr->hotItem) { /* redraw old hot item */
if (infoPtr->hotItem)
if (infoPtr->hotItem && (infoPtr->dwStyle & TVS_TRACKSELECT) ) InvalidateRect(infoPtr->hwnd, &infoPtr->hotItem->rect,
TRUE); infoPtr->hotItem = item; /* redraw new hot item */
if (infoPtr->hotItem)
if (infoPtr->hotItem && (infoPtr->dwStyle & TVS_TRACKSELECT) ) InvalidateRect(infoPtr->hwnd, &infoPtr->hotItem->rect,
TRUE);
Same here. Don't change the hot item if the hot item isn't going to be repainted anyway.
Rob