Commit 7030c5f7 authored by Chris Morgan's avatar Chris Morgan Committed by Alexandre Julliard

Reduce toolbar redrawing and flicker by calling RedrawWindow() in

TOOLBAR_MouseMove() only if hot effect applies to the current hot button. Restore bHot flag of hot button in TOOLBAR_LButtonUp() to restore hot effect properly.
parent 7f90a8c9
......@@ -3159,6 +3159,10 @@ TOOLBAR_LButtonUp (HWND hwnd, WPARAM wParam, LPARAM lParam)
pt.y = (INT)HIWORD(lParam);
nHit = TOOLBAR_InternalHitTest (hwnd, &pt);
/* restore hot effect to hot button disabled by TOOLBAR_LButtonDown() */
if(infoPtr->nHotItem >= 0)
infoPtr->buttons[infoPtr->nHotItem].bHot = TRUE;
if ((infoPtr->bCaptured) && (infoPtr->nButtonDown >= 0)) {
infoPtr->bCaptured = FALSE;
ReleaseCapture ();
......@@ -3317,10 +3321,14 @@ TOOLBAR_MouseMove (HWND hwnd, WPARAM wParam, LPARAM lParam)
btnPtr = &infoPtr->buttons[nHit];
btnPtr->bHot = TRUE;
infoPtr->nHotItem = nHit;
/* only enabled buttons show hot effect */
if(infoPtr->buttons[nHit].fsState & TBSTATE_ENABLED)
{
RedrawWindow(hwnd,&btnPtr->rect,NULL,
RDW_ERASE|RDW_INVALIDATE|RDW_UPDATENOW);
infoPtr->nHotItem = nHit;
}
}
if (infoPtr->bCaptured) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment