comctl32/treeview: Fix mouse tracking request code.

After query current tracking state passed parameters could be overwritten,
similar fix for Listview was recently committed.
This commit is contained in:
Nikolay Sivov 2009-12-11 21:11:48 +03:00 committed by Alexandre Julliard
parent 6bf79b885f
commit 28d5410596

View File

@ -5280,7 +5280,6 @@ TREEVIEW_MouseMove (TREEVIEW_INFO * infoPtr, LPARAM lParam)
trackinfo.cbSize = sizeof(TRACKMOUSEEVENT); trackinfo.cbSize = sizeof(TRACKMOUSEEVENT);
trackinfo.dwFlags = TME_QUERY; trackinfo.dwFlags = TME_QUERY;
trackinfo.hwndTrack = infoPtr->hwnd; trackinfo.hwndTrack = infoPtr->hwnd;
trackinfo.dwHoverTime = HOVER_DEFAULT;
/* call _TrackMouseEvent to see if we are currently tracking for this hwnd */ /* call _TrackMouseEvent to see if we are currently tracking for this hwnd */
_TrackMouseEvent(&trackinfo); _TrackMouseEvent(&trackinfo);
@ -5289,6 +5288,9 @@ TREEVIEW_MouseMove (TREEVIEW_INFO * infoPtr, LPARAM lParam)
if(!(trackinfo.dwFlags & TME_LEAVE)) if(!(trackinfo.dwFlags & TME_LEAVE))
{ {
trackinfo.dwFlags = TME_LEAVE; /* notify upon leaving */ trackinfo.dwFlags = TME_LEAVE; /* notify upon leaving */
trackinfo.hwndTrack = infoPtr->hwnd;
/* do it as fast as possible, minimal systimer latency will be used */
trackinfo.dwHoverTime = 1;
/* call TRACKMOUSEEVENT so we receive a WM_MOUSELEAVE message */ /* call TRACKMOUSEEVENT so we receive a WM_MOUSELEAVE message */
/* and can properly deactivate the hot item */ /* and can properly deactivate the hot item */