From 0e4cf6c08314c01398be14357738809abe750d06 Mon Sep 17 00:00:00 2001
From: Rein Klazes <rklazes@xs4all.nl>
Date: Tue, 15 Jan 2002 20:27:30 +0000
Subject: [PATCH] Don't change button state on WM_MOUSEMOVE messages unless
 left mouse button is pressed.

---
 controls/button.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/controls/button.c b/controls/button.c
index 90bafbbfb93..ccb1052d0b7 100644
--- a/controls/button.c
+++ b/controls/button.c
@@ -279,7 +279,7 @@ static LRESULT WINAPI ButtonWndProc_common(HWND hWnd, UINT uMsg,
         break;
 
     case WM_MOUSEMOVE:
-        if (GetCapture() == hWnd)
+        if ((wParam & MK_LBUTTON) && GetCapture() == hWnd)
         {
             GetClientRect( hWnd, &rect );
             SendMessageW( hWnd, BM_SETSTATE, PtInRect(&rect, pt), 0 );
-- 
GitLab