Discard mouse button up events if no button is currently pressed.
diff --git a/dlls/comctl32/toolbar.c b/dlls/comctl32/toolbar.c index 3811828..8c1c67e 100644 --- a/dlls/comctl32/toolbar.c +++ b/dlls/comctl32/toolbar.c
@@ -5042,6 +5042,7 @@ if((infoPtr->nHotItem >= 0) && (nHit != -1)) infoPtr->buttons[infoPtr->nHotItem].bHot = TRUE; + if (0 <= infoPtr->nButtonDown) { btnPtr = &infoPtr->buttons[infoPtr->nButtonDown]; btnPtr->fsState &= ~TBSTATE_PRESSED; @@ -5111,6 +5112,7 @@ nmmouse.dwItemData = btnPtr->dwData; TOOLBAR_SendNotify ((NMHDR *) &nmmouse, infoPtr, NM_CLICK); } + } return 0; }