Do not process WM_LBUTTONUP message in ButtonWndProc()
when the mouse is not captured.

diff --git a/controls/button.c b/controls/button.c
index 9b49d85..aa8f0f7 100644
--- a/controls/button.c
+++ b/controls/button.c
@@ -143,6 +143,8 @@
         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 );