[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
b3fb8555bf

No need to sync anything with Wine, their code is
correct on Wine head. The bug was in ros specific diff.
This commit is contained in:
Joachim Henze 2020-10-03 15:38:02 +02:00
parent e57a59a60a
commit c947eb4d17

View file

@ -854,7 +854,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)))
@ -864,6 +863,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)
{
@ -871,7 +871,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__