Index: dlls/comctl32/toolbar.c =================================================================== RCS file: /home/wine/wine/dlls/comctl32/toolbar.c,v retrieving revision 1.207 diff -u -r1.207 toolbar.c --- dlls/comctl32/toolbar.c 26 Jan 2005 21:09:05 -0000 1.207 +++ dlls/comctl32/toolbar.c 27 Jan 2005 18:42:29 -0000 @@ -6080,24 +6080,26 @@ TRACKMOUSEEVENT trackinfo; INT nHit; TBUTTON_INFO *btnPtr; + + if (infoPtr->dwStyle & TBSTYLE_FLAT) { + /* fill in the TRACKMOUSEEVENT struct */ + trackinfo.cbSize = sizeof(TRACKMOUSEEVENT); + trackinfo.dwFlags = TME_QUERY; + trackinfo.hwndTrack = hwnd; + trackinfo.dwHoverTime = HOVER_DEFAULT; - /* 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)) { - trackinfo.dwFlags = TME_LEAVE; /* notify upon leaving */ - - /* call TRACKMOUSEEVENT so we receive a WM_MOUSELEAVE message */ - /* and can properly deactivate the hot toolbar button */ + /* 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)) { + trackinfo.dwFlags = TME_LEAVE; /* notify upon leaving */ + + /* call TRACKMOUSEEVENT so we receive a WM_MOUSELEAVE message */ + /* and can properly deactivate the hot toolbar button */ + _TrackMouseEvent(&trackinfo); + } + } if (infoPtr->hwndToolTip) TOOLBAR_RelayEvent (infoPtr->hwndToolTip, hwnd, @@ -6108,7 +6110,7 @@ nHit = TOOLBAR_InternalHitTest (hwnd, &pt); - if (!infoPtr->bAnchor || (nHit >= 0)) + if ((infoPtr->dwStyle & TBSTYLE_FLAT) && (!infoPtr->bAnchor || (nHit >= 0))) TOOLBAR_SetHotItemEx(infoPtr, nHit, HICF_MOUSE); if (infoPtr->nOldHit != nHit)