From: Fabian Maurer dark.shadow4@web.de
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=56109 --- dlls/comctl32/button.c | 6 ++++++ dlls/comctl32/tests/button.c | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-)
diff --git a/dlls/comctl32/button.c b/dlls/comctl32/button.c index 77eb54fbcf1..b39439799db 100644 --- a/dlls/comctl32/button.c +++ b/dlls/comctl32/button.c @@ -866,6 +866,12 @@ static LRESULT CALLBACK BUTTON_WindowProc(HWND hWnd, UINT uMsg, WPARAM wParam, L
if (style & BS_NOTIFY) BUTTON_NOTIFY_PARENT(hWnd, BN_SETFOCUS); + + if (((btn_type == BS_RADIOBUTTON) || (btn_type == BS_AUTORADIOBUTTON)) && + !(infoPtr->state & BST_CHECKED)) + { + BUTTON_NOTIFY_PARENT(hWnd, BN_CLICKED); + } break;
case WM_KILLFOCUS: diff --git a/dlls/comctl32/tests/button.c b/dlls/comctl32/tests/button.c index 7ec7d744e6c..2414ad3b029 100644 --- a/dlls/comctl32/tests/button.c +++ b/dlls/comctl32/tests/button.c @@ -2409,7 +2409,7 @@ static void test_radiobutton_focus(void) flush_sequences(sequences, NUM_MSG_SEQUENCES); SendMessageA(button, WM_SETFOCUS, 0, 0); while (PeekMessageA(&msg, 0, 0, 0, PM_REMOVE)) DispatchMessageA(&msg); - ok_sequence(sequences, COMBINED_SEQ_INDEX, set_focus1, "WM_SETFOCUS on a radiobutton 1", TRUE); + ok_sequence(sequences, COMBINED_SEQ_INDEX, set_focus1, "WM_SETFOCUS on a radiobutton 1", FALSE);
SendMessageA(button, BM_SETCHECK, BST_CHECKED, 0); flush_sequences(sequences, NUM_MSG_SEQUENCES);