Move notifies around to match native
Vitaliy Margolen
wine-patch at kievinfo.com
Tue Apr 12 13:24:11 CDT 2005
Comparing spy output between builtin and native one could see that native sends
notifies _after_ invalidating changes.
Also small fix for custom draw color. Native does not use colors returned from
NM_CUSTOMDRAW notify.
Vitaliy Margolen
changelog:
comctl32/treeview.c:
Send notifies after invalidating changed areas
Don't use custom draw returned colors for control
-------------- next part --------------
Index: dlls/comctl32/treeview.c
===================================================================
RCS file: /home/wine/wine/dlls/comctl32/treeview.c,v
retrieving revision 1.169
diff -u -p -r1.169 treeview.c
--- dlls/comctl32/treeview.c 23 Mar 2005 11:58:58 -0000 1.169
+++ dlls/comctl32/treeview.c 12 Apr 2005 16:51:37 -0000
@@ -657,8 +657,6 @@ TREEVIEW_SendCustomDrawItemNotify(TREEVI
(WPARAM)nmcd->hdr.idFrom,
(LPARAM)&nmcdhdr);
- infoPtr->clrText = nmcdhdr.clrText;
- infoPtr->clrBk = nmcdhdr.clrTextBk;
return (BOOL)retval;
}
@@ -4220,14 +4218,17 @@ TREEVIEW_DoSelectItem(TREEVIEW_INFO *inf
TREEVIEW_EnsureVisible(infoPtr, infoPtr->selectedItem, FALSE);
+ if (prevSelect)
+ TREEVIEW_Invalidate(infoPtr, prevSelect);
+ if (newSelect)
+ TREEVIEW_Invalidate(infoPtr, newSelect);
+
TREEVIEW_SendTreeviewNotify(infoPtr,
TVN_SELCHANGEDW,
cause,
TVIF_HANDLE | TVIF_STATE | TVIF_PARAM,
prevSelect,
newSelect);
- TREEVIEW_Invalidate(infoPtr, prevSelect);
- TREEVIEW_Invalidate(infoPtr, newSelect);
break;
case TVGN_DROPHILITE:
@@ -5304,8 +5305,8 @@ TREEVIEW_SetFocus(TREEVIEW_INFO *infoPtr
TVC_UNKNOWN);
}
- TREEVIEW_SendSimpleNotify(infoPtr, NM_SETFOCUS);
TREEVIEW_Invalidate(infoPtr, infoPtr->selectedItem);
+ TREEVIEW_SendSimpleNotify(infoPtr, NM_SETFOCUS);
return 0;
}
@@ -5314,8 +5315,9 @@ TREEVIEW_KillFocus(TREEVIEW_INFO *infoPt
{
TRACE("\n");
- TREEVIEW_SendSimpleNotify(infoPtr, NM_KILLFOCUS);
TREEVIEW_Invalidate(infoPtr, infoPtr->selectedItem);
+ UpdateWindow(infoPtr->hwnd);
+ TREEVIEW_SendSimpleNotify(infoPtr, NM_KILLFOCUS);
return 0;
}
More information about the wine-patches
mailing list