summaryrefslogtreecommitdiff
path: root/xfa/fwl/core/ifwl_form.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'xfa/fwl/core/ifwl_form.cpp')
-rw-r--r--xfa/fwl/core/ifwl_form.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/xfa/fwl/core/ifwl_form.cpp b/xfa/fwl/core/ifwl_form.cpp
index e46328b634..2ded30e6d6 100644
--- a/xfa/fwl/core/ifwl_form.cpp
+++ b/xfa/fwl/core/ifwl_form.cpp
@@ -830,10 +830,11 @@ void CFWL_FormImpDelegate::OnProcessMessage(CFWL_Message* pMessage) {
if (pSubFocus == pDriver->GetFocus()) {
pDriver->SetFocus(nullptr);
} else if (pSubFocus->GetStates() & FWL_WGTSTATE_Focused) {
- CFWL_MsgKillFocus ms;
- IFWL_WidgetDelegate* pDelegate = pSubFocus->SetDelegate(nullptr);
- if (pDelegate)
+ if (IFWL_WidgetDelegate* pDelegate =
+ pSubFocus->GetCurrentDelegate()) {
+ CFWL_MsgKillFocus ms;
pDelegate->OnProcessMessage(&ms);
+ }
}
}
m_pOwner->Repaint(&m_pOwner->m_rtRelative);