comctl32[1/2]: toolbar: set correcly hwndTrack in TrackMouseEvent
call
Mikołaj Zalewski
mikolaj at zalewski.pl
Thu Sep 28 13:56:08 CDT 2006
It seems the previous code was written with a wrong assumption that
there is a MOUSETRACKEVENT for each window and WM_MOUSELEAVE was never
received.
-------------- next part --------------
diff --git a/dlls/comctl32/toolbar.c b/dlls/comctl32/toolbar.c
index 9de8e76..4f725ed 100644
--- a/dlls/comctl32/toolbar.c
+++ b/dlls/comctl32/toolbar.c
@@ -6226,15 +6226,14 @@ TOOLBAR_MouseMove (HWND hwnd, WPARAM wPa
/* 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 */
--
1.4.2.1
More information about the wine-patches
mailing list