diff --git a/controls/button.c b/controls/button.c
index 9b49d85aedccb72b0893c38a0633a633b26ebb37..aa8f0f72bed208b440764e2ea3b19f708c47dbcd 100644
--- a/controls/button.c
+++ b/controls/button.c
@@ -143,6 +143,8 @@ static inline LRESULT WINAPI ButtonWndProc_locked(WND* wndPtr, UINT uMsg,
         break;
 
     case WM_LBUTTONUP:
+	/* FIXME: real windows uses extra flags in the status for this */
+        if (GetCapture() != hWnd) break;
         ReleaseCapture();
         if (!(infoPtr->state & BUTTON_HIGHLIGHTED)) break;
         SendMessageA( hWnd, BM_SETSTATE, FALSE, 0 );