| Index: xfa/fwl/core/cfwl_pushbutton.cpp
|
| diff --git a/xfa/fwl/core/cfwl_pushbutton.cpp b/xfa/fwl/core/cfwl_pushbutton.cpp
|
| index 15e98fc4a51de08eac869aaecc6cad29bc318a3f..5f0e2fb17c2e6982eceddc76352bbbf866181d15 100644
|
| --- a/xfa/fwl/core/cfwl_pushbutton.cpp
|
| +++ b/xfa/fwl/core/cfwl_pushbutton.cpp
|
| @@ -11,7 +11,7 @@
|
|
|
| #include "third_party/base/ptr_util.h"
|
| #include "xfa/fde/tto/fde_textout.h"
|
| -#include "xfa/fwl/core/cfwl_evtclick.h"
|
| +#include "xfa/fwl/core/cfwl_event.h"
|
| #include "xfa/fwl/core/cfwl_evtmouse.h"
|
| #include "xfa/fwl/core/cfwl_msgkey.h"
|
| #include "xfa/fwl/core/cfwl_msgmouse.h"
|
| @@ -248,7 +248,7 @@ void CFWL_PushButton::OnLButtonUp(CFWL_MsgMouse* pMsg) {
|
| m_pProperties->m_dwStates &= ~FWL_STATE_PSB_Pressed;
|
| }
|
| if (m_rtClient.Contains(pMsg->m_fx, pMsg->m_fy)) {
|
| - CFWL_EvtClick wmClick;
|
| + CFWL_Event wmClick(CFWL_EventType::Click);
|
| wmClick.m_pSrcTarget = this;
|
| DispatchEvent(&wmClick);
|
| }
|
| @@ -297,18 +297,14 @@ void CFWL_PushButton::OnMouseLeave(CFWL_MsgMouse* pMsg) {
|
| }
|
|
|
| void CFWL_PushButton::OnKeyDown(CFWL_MsgKey* pMsg) {
|
| - if (pMsg->m_dwKeyCode == FWL_VKEY_Return) {
|
| - CFWL_EvtMouse wmMouse;
|
| - wmMouse.m_pSrcTarget = this;
|
| - wmMouse.m_dwCmd = FWL_MouseCommand::LeftButtonUp;
|
| - DispatchEvent(&wmMouse);
|
| - CFWL_EvtClick wmClick;
|
| - wmClick.m_pSrcTarget = this;
|
| - DispatchEvent(&wmClick);
|
| - return;
|
| - }
|
| - if (pMsg->m_dwKeyCode != FWL_VKEY_Tab)
|
| + if (pMsg->m_dwKeyCode != FWL_VKEY_Return)
|
| return;
|
|
|
| - DispatchKeyEvent(pMsg);
|
| + CFWL_EvtMouse wmMouse;
|
| + wmMouse.m_pSrcTarget = this;
|
| + wmMouse.m_dwCmd = FWL_MouseCommand::LeftButtonUp;
|
| + DispatchEvent(&wmMouse);
|
| + CFWL_Event wmClick(CFWL_EventType::Click);
|
| + wmClick.m_pSrcTarget = this;
|
| + DispatchEvent(&wmClick);
|
| }
|
|
|