From 764c5b3b35a6a05c734ea7799a335423ffec7ed0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miko=C5=82aj=20Zalewski?= Date: Thu, 28 Sep 2006 20:56:08 +0200 Subject: [PATCH] comctl32: toolbar: Set correcly hwndTrack in TrackMouseEvent call. --- dlls/comctl32/toolbar.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/dlls/comctl32/toolbar.c b/dlls/comctl32/toolbar.c index 9de8e768798..4f725edb90f 100644 --- a/dlls/comctl32/toolbar.c +++ b/dlls/comctl32/toolbar.c @@ -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 */