From: Esme Povirk esme@codeweavers.com
--- dlls/user32/button.c | 2 ++ dlls/user32/tests/msg.c | 30 +++++++++++++++--------------- 2 files changed, 17 insertions(+), 15 deletions(-)
diff --git a/dlls/user32/button.c b/dlls/user32/button.c index 10a111562a7..3146f0cd4e9 100644 --- a/dlls/user32/button.c +++ b/dlls/user32/button.c @@ -466,6 +466,8 @@ LRESULT ButtonWndProc_common(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam, set_button_state( hWnd, state & ~BST_PUSHED );
paint_button( hWnd, btn_type, ODA_SELECT ); + + NtUserNotifyWinEvent( EVENT_OBJECT_STATECHANGE, hWnd, OBJID_CLIENT, 0 ); break;
case WM_NCHITTEST: diff --git a/dlls/user32/tests/msg.c b/dlls/user32/tests/msg.c index 5bef582ad7d..bccac68ec2d 100644 --- a/dlls/user32/tests/msg.c +++ b/dlls/user32/tests/msg.c @@ -6472,7 +6472,7 @@ static const struct message WmLButtonDownSeq[] = { WM_CTLCOLORBTN, sent|defwinproc }, { BM_SETSTATE, sent|wparam|defwinproc, TRUE }, { WM_CTLCOLORBTN, sent|defwinproc }, - { EVENT_OBJECT_STATECHANGE, winevent_hook|wparam|lparam|msg_todo, OBJID_CLIENT, 0 }, + { EVENT_OBJECT_STATECHANGE, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 }, { 0 } }; static const struct message WmLButtonDownStaticSeq[] = @@ -6487,7 +6487,7 @@ static const struct message WmLButtonDownStaticSeq[] = { WM_CTLCOLORSTATIC, sent|defwinproc }, { BM_SETSTATE, sent|wparam|defwinproc, TRUE }, { WM_CTLCOLORSTATIC, sent|defwinproc }, - { EVENT_OBJECT_STATECHANGE, winevent_hook|wparam|lparam|msg_todo, OBJID_CLIENT, 0 }, + { EVENT_OBJECT_STATECHANGE, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 }, { 0 } }; static const struct message WmLButtonUpSeq[] = @@ -6495,7 +6495,7 @@ static const struct message WmLButtonUpSeq[] = { WM_LBUTTONUP, sent|wparam|lparam, 0, 0 }, { BM_SETSTATE, sent|wparam|defwinproc, FALSE }, { WM_CTLCOLORBTN, sent|defwinproc }, - { EVENT_OBJECT_STATECHANGE, winevent_hook|wparam|lparam|msg_todo, OBJID_CLIENT, 0 }, + { EVENT_OBJECT_STATECHANGE, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 }, { EVENT_SYSTEM_CAPTUREEND, winevent_hook|wparam|lparam, 0, 0 }, { WM_CAPTURECHANGED, sent|wparam|defwinproc, 0 }, { 0 } @@ -6505,7 +6505,7 @@ static const struct message WmLButtonUpStaticSeq[] = { WM_LBUTTONUP, sent|wparam|lparam, 0, 0 }, { BM_SETSTATE, sent|wparam|defwinproc, FALSE }, { WM_CTLCOLORSTATIC, sent|defwinproc }, - { EVENT_OBJECT_STATECHANGE, winevent_hook|wparam|lparam|msg_todo, OBJID_CLIENT, 0 }, + { EVENT_OBJECT_STATECHANGE, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 }, { EVENT_SYSTEM_CAPTUREEND, winevent_hook|wparam|lparam, 0, 0 }, { WM_CAPTURECHANGED, sent|wparam|defwinproc, 0 }, { 0 } @@ -6515,7 +6515,7 @@ static const struct message WmLButtonUpAutoSeq[] = { WM_LBUTTONUP, sent|wparam|lparam, 0, 0 }, { BM_SETSTATE, sent|wparam|defwinproc, FALSE }, { WM_CTLCOLORSTATIC, sent|defwinproc }, - { EVENT_OBJECT_STATECHANGE, winevent_hook|wparam|lparam|msg_todo, OBJID_CLIENT, 0 }, + { EVENT_OBJECT_STATECHANGE, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 }, { EVENT_SYSTEM_CAPTUREEND, winevent_hook|wparam|lparam|optional, 0, 0 }, { BM_SETCHECK, sent|defwinproc }, { WM_CTLCOLORSTATIC, sent|defwinproc|optional, 0, 0 }, /* Sent here on Win7. */ @@ -6636,7 +6636,7 @@ static const struct message WmSetStateButtonSeq[] = { { BM_SETSTATE, sent }, { WM_CTLCOLORBTN, sent|parent }, - { 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 }, { 0 } }; @@ -6644,7 +6644,7 @@ static const struct message WmSetStateStaticSeq[] = { { BM_SETSTATE, sent }, { WM_CTLCOLORSTATIC, sent|parent }, - { 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 }, { 0 } }; @@ -6653,7 +6653,7 @@ static const struct message WmSetStateUserSeq[] = { BM_SETSTATE, sent }, { WM_CTLCOLORBTN, sent|parent }, { WM_COMMAND, sent|wparam|parent, MAKEWPARAM(ID_BUTTON, BN_HILITE) }, - { 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 }, { 0 } }; @@ -6662,7 +6662,7 @@ static const struct message WmSetStateOwnerdrawSeq[] = { BM_SETSTATE, sent }, { WM_CTLCOLORBTN, sent|parent }, { WM_DRAWITEM, sent|wparam|lparam|parent, ID_BUTTON, 0x000120e4 }, - { 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 }, { 0 } }; @@ -6671,7 +6671,7 @@ static const struct message WmClearStateButtonSeq[] = { BM_SETSTATE, sent }, { WM_CTLCOLORBTN, sent|parent }, { WM_COMMAND, sent|wparam|parent, MAKEWPARAM(ID_BUTTON, BN_UNHILITE) }, - { 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 }, { 0 } }; @@ -6682,14 +6682,14 @@ static const struct message WmDisableButtonSeq[] = { BM_SETSTATE, sent|defwinproc }, { WM_CTLCOLORSTATIC, sent|defwinproc|optional }, { WM_CTLCOLORBTN, sent|optional }, - { EVENT_OBJECT_STATECHANGE, winevent_hook|wparam|lparam|msg_todo, OBJID_CLIENT, 0 }, + { EVENT_OBJECT_STATECHANGE, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 }, { WM_LBUTTONUP, sent }, { BM_SETSTATE, sent|defwinproc }, { WM_CTLCOLORBTN, sent|defwinproc|optional }, { WM_CTLCOLORSTATIC, sent|defwinproc|optional }, { BM_SETCHECK, sent|defwinproc|optional }, { WM_CTLCOLORBTN, sent|optional }, - { EVENT_OBJECT_STATECHANGE, winevent_hook|wparam|lparam|msg_todo, OBJID_CLIENT, 0 }, + { EVENT_OBJECT_STATECHANGE, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 }, { EVENT_SYSTEM_CAPTUREEND, winevent_hook|wparam|lparam, 0, 0 }, { WM_CTLCOLORSTATIC, sent|defwinproc|optional }, { WM_CAPTURECHANGED, sent|defwinproc }, @@ -6701,7 +6701,7 @@ static const struct message WmClearStateOwnerdrawSeq[] = { BM_SETSTATE, sent }, { WM_CTLCOLORBTN, sent|parent }, { WM_DRAWITEM, sent|wparam|lparam|parent, ID_BUTTON, 0x000020e4 }, - { 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 }, { 0 } }; @@ -7250,11 +7250,11 @@ static const struct message auto_radio_button_BM_CLICK[] = { EVENT_SYSTEM_CAPTURESTART, winevent_hook|wparam|lparam, 0, 0 }, { BM_SETSTATE, sent|wparam|lparam|defwinproc, BST_CHECKED, ID_RADIO2 }, { WM_CTLCOLORSTATIC, sent|parent }, - { EVENT_OBJECT_STATECHANGE, winevent_hook|wparam|lparam|msg_todo, OBJID_CLIENT, 0 }, + { EVENT_OBJECT_STATECHANGE, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 }, { WM_LBUTTONUP, sent|wparam|lparam|defwinproc, 0, 0 }, { BM_SETSTATE, sent|wparam|lparam|defwinproc, BST_UNCHECKED, ID_RADIO2 }, { WM_CTLCOLORSTATIC, sent|parent }, - { EVENT_OBJECT_STATECHANGE, winevent_hook|wparam|lparam|msg_todo, OBJID_CLIENT, 0 }, + { EVENT_OBJECT_STATECHANGE, winevent_hook|wparam|lparam, OBJID_CLIENT, 0 }, { WM_GETDLGCODE, sent|wparam|lparam|defwinproc, ID_RADIO2, 0 }, { BM_SETCHECK, sent|wparam|lparam|defwinproc, BST_CHECKED, ID_RADIO2 }, { WM_GETDLGCODE, sent|wparam|lparam|defwinproc, ID_RADIO1, 0 },