Module: wine Branch: master Commit: efacaf1b5a57f2005459497852e549811868d0d5 URL: https://source.winehq.org/git/wine.git/?a=commit;h=efacaf1b5a57f200545949785... Author: Gabriel Ivăncescu <gabrielopcode(a)gmail.com> Date: Tue Mar 5 15:13:28 2019 +0200 comctl32/button: Don't draw the button when losing focus before invalidating it. It's already invalidated at the end so there's no reason to draw it before that. Signed-off-by: Gabriel Ivăncescu <gabrielopcode(a)gmail.com> Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/comctl32/button.c | 1 - dlls/comctl32/tests/button.c | 3 +-- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/dlls/comctl32/button.c b/dlls/comctl32/button.c index 16b36d4..f7497a1 100644 --- a/dlls/comctl32/button.c +++ b/dlls/comctl32/button.c @@ -770,7 +770,6 @@ static LRESULT CALLBACK BUTTON_WindowProc(HWND hWnd, UINT uMsg, WPARAM wParam, L case WM_KILLFOCUS: TRACE("WM_KILLFOCUS %p\n",hWnd); infoPtr->state &= ~BST_FOCUS; - paint_button( infoPtr, btn_type, ODA_FOCUS ); if ((infoPtr->state & BUTTON_BTNPRESSED) && GetCapture() == hWnd) ReleaseCapture(); diff --git a/dlls/comctl32/tests/button.c b/dlls/comctl32/tests/button.c index ce673af..753aa24 100644 --- a/dlls/comctl32/tests/button.c +++ b/dlls/comctl32/tests/button.c @@ -600,11 +600,10 @@ static void test_button_messages(void) while (PeekMessageA(&msg, 0, 0, 0, PM_REMOVE)) DispatchMessageA(&msg); ok_sequence(sequences, COMBINED_SEQ_INDEX, button[i].setfocus, "SetFocus(hwnd) on a button", todo); - todo = button[i].style == BS_OWNERDRAW; SetFocus(0); SendMessageA(hwnd, WM_APP, 0, 0); /* place a separator mark here */ while (PeekMessageA(&msg, 0, 0, 0, PM_REMOVE)) DispatchMessageA(&msg); - ok_sequence(sequences, COMBINED_SEQ_INDEX, button[i].killfocus, "SetFocus(0) on a button", todo); + ok_sequence(sequences, COMBINED_SEQ_INDEX, button[i].killfocus, "SetFocus(0) on a button", FALSE); ok(GetFocus() == 0, "expected focus 0, got %p\n", GetFocus()); SendMessageA(hwnd, BM_SETSTYLE, button[i].style | BS_BOTTOM, TRUE);