comctl32: toolbar: Set correcly hwndTrack in TrackMouseEvent call.
This commit is contained in:
parent
bfaa34c0d6
commit
764c5b3b35
|
@ -6226,15 +6226,14 @@ TOOLBAR_MouseMove (HWND hwnd, WPARAM wParam, LPARAM lParam)
|
||||||
/* fill in the TRACKMOUSEEVENT struct */
|
/* fill in the TRACKMOUSEEVENT struct */
|
||||||
trackinfo.cbSize = sizeof(TRACKMOUSEEVENT);
|
trackinfo.cbSize = sizeof(TRACKMOUSEEVENT);
|
||||||
trackinfo.dwFlags = TME_QUERY;
|
trackinfo.dwFlags = TME_QUERY;
|
||||||
trackinfo.hwndTrack = 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);
|
||||||
|
|
||||||
/* Make sure tracking is enabled so we receive a WM_MOUSELEAVE message */
|
/* 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.dwFlags = TME_LEAVE; /* notify upon leaving */
|
||||||
|
trackinfo.hwndTrack = hwnd;
|
||||||
|
|
||||||
/* call TRACKMOUSEEVENT so we receive a WM_MOUSELEAVE message */
|
/* call TRACKMOUSEEVENT so we receive a WM_MOUSELEAVE message */
|
||||||
/* and can properly deactivate the hot toolbar button */
|
/* and can properly deactivate the hot toolbar button */
|
||||||
|
|
Loading…
Reference in New Issue