comctl32: toolbar: Set correcly hwndTrack in TrackMouseEvent call.

This commit is contained in:
Mikołaj Zalewski 2006-09-28 20:56:08 +02:00 committed by Alexandre Julliard
parent bfaa34c0d6
commit 764c5b3b35
1 changed files with 2 additions and 3 deletions

View File

@ -6226,15 +6226,14 @@ TOOLBAR_MouseMove (HWND hwnd, WPARAM wParam, LPARAM lParam)
/* fill in the TRACKMOUSEEVENT struct */
trackinfo.cbSize = sizeof(TRACKMOUSEEVENT);
trackinfo.dwFlags = TME_QUERY;
trackinfo.hwndTrack = hwnd;
trackinfo.dwHoverTime = HOVER_DEFAULT;
/* call _TrackMouseEvent to see if we are currently tracking for this hwnd */
_TrackMouseEvent(&trackinfo);
/* Make sure tracking is enabled so we receive a WM_MOUSELEAVE message */
if(!(trackinfo.dwFlags & TME_LEAVE)) {
if(trackinfo.hwndTrack != hwnd || !(trackinfo.dwFlags & TME_LEAVE)) {
trackinfo.dwFlags = TME_LEAVE; /* notify upon leaving */
trackinfo.hwndTrack = hwnd;
/* call TRACKMOUSEEVENT so we receive a WM_MOUSELEAVE message */
/* and can properly deactivate the hot toolbar button */