From: Esme Povirk esme@codeweavers.com
--- dlls/user32/button.c | 2 ++ dlls/user32/tests/msg.c | 8 ++++---- 2 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/dlls/user32/button.c b/dlls/user32/button.c index b7492eac3ff..61e34f99246 100644 --- a/dlls/user32/button.c +++ b/dlls/user32/button.c @@ -406,6 +406,8 @@ LRESULT ButtonWndProc_common(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam, style = (style & ~BS_TYPEMASK) | btn_type; WIN_SetStyle( hWnd, style, BS_TYPEMASK & ~style );
+ NtUserNotifyWinEvent( EVENT_OBJECT_STATECHANGE, hWnd, OBJID_CLIENT, 0 ); + /* Only redraw if lParam flag is set.*/ if (lParam) NtUserInvalidateRect( hWnd, NULL, TRUE ); diff --git a/dlls/user32/tests/msg.c b/dlls/user32/tests/msg.c index af6a0d85423..9ee0965023e 100644 --- a/dlls/user32/tests/msg.c +++ b/dlls/user32/tests/msg.c @@ -6591,7 +6591,7 @@ static const struct message WmSetTextInvisibleSeq[] = static const struct message WmSetStyleButtonSeq[] = { { BM_SETSTYLE, sent }, - { EVENT_OBJECT_STATECHANGE, winevent_hook|wparam|lparam|msg_todo, OBJID_CLIENT, 0 }, + { EVENT_OBJECT_STATECHANGE, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 }, { WM_APP, sent|wparam|lparam, 0, 0 }, { WM_PAINT, sent }, { WM_ERASEBKGND, sent|defwinproc|optional }, /* Win9x doesn't send it */ @@ -6601,7 +6601,7 @@ static const struct message WmSetStyleButtonSeq[] = static const struct message WmSetStyleStaticSeq[] = { { BM_SETSTYLE, sent }, - { EVENT_OBJECT_STATECHANGE, winevent_hook|wparam|lparam|msg_todo, OBJID_CLIENT, 0 }, + { EVENT_OBJECT_STATECHANGE, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 }, { WM_APP, sent|wparam|lparam, 0, 0 }, { WM_PAINT, sent }, { WM_ERASEBKGND, sent|defwinproc|optional }, /* Win9x doesn't send it */ @@ -6611,7 +6611,7 @@ static const struct message WmSetStyleStaticSeq[] = static const struct message WmSetStyleUserSeq[] = { { BM_SETSTYLE, sent }, - { EVENT_OBJECT_STATECHANGE, winevent_hook|wparam|lparam|msg_todo, OBJID_CLIENT, 0 }, + { EVENT_OBJECT_STATECHANGE, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 }, { WM_APP, sent|wparam|lparam, 0, 0 }, { WM_PAINT, sent }, { WM_NCPAINT, sent|defwinproc|wine_only }, /* FIXME: Wine sends it */ @@ -6623,7 +6623,7 @@ static const struct message WmSetStyleUserSeq[] = static const struct message WmSetStyleOwnerdrawSeq[] = { { BM_SETSTYLE, sent }, - { EVENT_OBJECT_STATECHANGE, winevent_hook|wparam|lparam|msg_todo, OBJID_CLIENT, 0 }, + { EVENT_OBJECT_STATECHANGE, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 }, { WM_APP, sent|wparam|lparam, 0, 0 }, { WM_PAINT, sent }, { WM_ERASEBKGND, sent|defwinproc|optional }, /* Win9x doesn't send it */