Commit 3b3574a4 authored by Vitaliy Margolen's avatar Vitaliy Margolen Committed by Alexandre Julliard

Send notifies after invalidating changed areas.

Don't use custom draw returned colors for control.
parent f7ff216a
...@@ -657,8 +657,6 @@ TREEVIEW_SendCustomDrawItemNotify(TREEVIEW_INFO *infoPtr, HDC hdc, ...@@ -657,8 +657,6 @@ TREEVIEW_SendCustomDrawItemNotify(TREEVIEW_INFO *infoPtr, HDC hdc,
(WPARAM)nmcd->hdr.idFrom, (WPARAM)nmcd->hdr.idFrom,
(LPARAM)&nmcdhdr); (LPARAM)&nmcdhdr);
infoPtr->clrText = nmcdhdr.clrText;
infoPtr->clrBk = nmcdhdr.clrTextBk;
return (BOOL)retval; return (BOOL)retval;
} }
...@@ -4220,14 +4218,17 @@ TREEVIEW_DoSelectItem(TREEVIEW_INFO *infoPtr, INT action, HTREEITEM newSelect, ...@@ -4220,14 +4218,17 @@ TREEVIEW_DoSelectItem(TREEVIEW_INFO *infoPtr, INT action, HTREEITEM newSelect,
TREEVIEW_EnsureVisible(infoPtr, infoPtr->selectedItem, FALSE); TREEVIEW_EnsureVisible(infoPtr, infoPtr->selectedItem, FALSE);
if (prevSelect)
TREEVIEW_Invalidate(infoPtr, prevSelect);
if (newSelect)
TREEVIEW_Invalidate(infoPtr, newSelect);
TREEVIEW_SendTreeviewNotify(infoPtr, TREEVIEW_SendTreeviewNotify(infoPtr,
TVN_SELCHANGEDW, TVN_SELCHANGEDW,
cause, cause,
TVIF_HANDLE | TVIF_STATE | TVIF_PARAM, TVIF_HANDLE | TVIF_STATE | TVIF_PARAM,
prevSelect, prevSelect,
newSelect); newSelect);
TREEVIEW_Invalidate(infoPtr, prevSelect);
TREEVIEW_Invalidate(infoPtr, newSelect);
break; break;
case TVGN_DROPHILITE: case TVGN_DROPHILITE:
...@@ -5304,8 +5305,8 @@ TREEVIEW_SetFocus(TREEVIEW_INFO *infoPtr) ...@@ -5304,8 +5305,8 @@ TREEVIEW_SetFocus(TREEVIEW_INFO *infoPtr)
TVC_UNKNOWN); TVC_UNKNOWN);
} }
TREEVIEW_SendSimpleNotify(infoPtr, NM_SETFOCUS);
TREEVIEW_Invalidate(infoPtr, infoPtr->selectedItem); TREEVIEW_Invalidate(infoPtr, infoPtr->selectedItem);
TREEVIEW_SendSimpleNotify(infoPtr, NM_SETFOCUS);
return 0; return 0;
} }
...@@ -5314,8 +5315,9 @@ TREEVIEW_KillFocus(TREEVIEW_INFO *infoPtr) ...@@ -5314,8 +5315,9 @@ TREEVIEW_KillFocus(TREEVIEW_INFO *infoPtr)
{ {
TRACE("\n"); TRACE("\n");
TREEVIEW_SendSimpleNotify(infoPtr, NM_KILLFOCUS);
TREEVIEW_Invalidate(infoPtr, infoPtr->selectedItem); TREEVIEW_Invalidate(infoPtr, infoPtr->selectedItem);
UpdateWindow(infoPtr->hwnd);
TREEVIEW_SendSimpleNotify(infoPtr, NM_KILLFOCUS);
return 0; return 0;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment