From ae666420d012069b8a0cdb5e6a71616ea0e78e67 Mon Sep 17 00:00:00 2001 From: Joachim Henze Date: Wed, 16 Jun 2021 09:41:22 +0200 Subject: [PATCH] [0.4.9][COMCTL32] Button.c Fix CORE-17260 Press'n'Hold of a button, then leaving the button rect should redraw the button in unpressed state Thanks to JIRA user 'I_kill_Bugs' for perfecting my initial experiments to fix that. It regressed by 0.4.9-dev-719-g b3fb8555bf9abcc04eeac31c7153d33e2f027fc0 No need to sync anything with Wine, their code is correct on Wine head. The bug was in ros specific diff. cherry picked from commit 0.4.15-dev-1085-g c947eb4d176603e0ff29217c079d8f5e1c2119e1 --- dll/win32/comctl32/button.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/dll/win32/comctl32/button.c b/dll/win32/comctl32/button.c index 263bca6438c..58fc8fa80e2 100644 --- a/dll/win32/comctl32/button.c +++ b/dll/win32/comctl32/button.c @@ -850,7 +850,6 @@ static LRESULT CALLBACK BUTTON_WindowProc(HWND hWnd, UINT uMsg, WPARAM wParam, L mouse_event.dwHoverTime = 1; TrackMouseEvent(&mouse_event); } - break; #else if (!TrackMouseEvent(&mouse_event) || !(mouse_event.dwFlags & (TME_HOVER | TME_LEAVE))) @@ -860,6 +859,7 @@ static LRESULT CALLBACK BUTTON_WindowProc(HWND hWnd, UINT uMsg, WPARAM wParam, L mouse_event.dwHoverTime = 1; TrackMouseEvent(&mouse_event); } +#endif if ((wParam & MK_LBUTTON) && GetCapture() == hWnd) { @@ -867,7 +867,6 @@ static LRESULT CALLBACK BUTTON_WindowProc(HWND hWnd, UINT uMsg, WPARAM wParam, L SendMessageW( hWnd, BM_SETSTATE, PtInRect(&rect, pt), 0 ); } break; -#endif } #ifndef __REACTOS__