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@gmail.com> Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
026233c429
commit
efacaf1b5a
|
@ -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();
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue