From: Fabian Maurer dark.shadow4@web.de
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=56109 --- dlls/user32/button.c | 6 ++++++ dlls/user32/tests/msg.c | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-)
diff --git a/dlls/user32/button.c b/dlls/user32/button.c index 61e34f99246..bbda202314f 100644 --- a/dlls/user32/button.c +++ b/dlls/user32/button.c @@ -381,6 +381,12 @@ LRESULT ButtonWndProc_common(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam, paint_button( hWnd, btn_type, ODA_FOCUS ); if (style & BS_NOTIFY) BUTTON_NOTIFY_PARENT(hWnd, BN_SETFOCUS); + + if (((btn_type == BS_RADIOBUTTON) || (btn_type == BS_AUTORADIOBUTTON)) && + !(get_button_state(hWnd) & BST_CHECKED)) + { + BUTTON_NOTIFY_PARENT(hWnd, BN_CLICKED); + } break;
case WM_KILLFOCUS: diff --git a/dlls/user32/tests/msg.c b/dlls/user32/tests/msg.c index fee63308782..9668d29e3e9 100644 --- a/dlls/user32/tests/msg.c +++ b/dlls/user32/tests/msg.c @@ -20512,7 +20512,7 @@ static void test_radiobutton_focus(void) flush_sequence(); SendMessageA(button, WM_SETFOCUS, 0, 0); while (PeekMessageA(&msg, 0, 0, 0, PM_REMOVE)) DispatchMessageA(&msg); - ok_sequence(set_focus1, "WM_SETFOCUS on a radiobutton 1", TRUE); + ok_sequence(set_focus1, "WM_SETFOCUS on a radiobutton 1", FALSE);
SendMessageA(button, BM_SETCHECK, BST_CHECKED, 0); flush_sequence();