summaryrefslogtreecommitdiff
path: root/xfa/fxfa/cxfa_ffbarcode.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'xfa/fxfa/cxfa_ffbarcode.cpp')
-rw-r--r--xfa/fxfa/cxfa_ffbarcode.cpp14
1 files changed, 5 insertions, 9 deletions
diff --git a/xfa/fxfa/cxfa_ffbarcode.cpp b/xfa/fxfa/cxfa_ffbarcode.cpp
index c458696ce8..e35f6c8696 100644
--- a/xfa/fxfa/cxfa_ffbarcode.cpp
+++ b/xfa/fxfa/cxfa_ffbarcode.cpp
@@ -221,18 +221,14 @@ void CXFA_FFBarcode::UpdateWidgetProperty() {
}
}
-bool CXFA_FFBarcode::OnLButtonDown(uint32_t dwFlags, const CFX_PointF& point) {
+bool CXFA_FFBarcode::AcceptsFocusOnButtonDown(uint32_t dwFlags,
+ const CFX_PointF& point,
+ FWL_MouseCommand command) {
auto* pBarCodeWidget = static_cast<CFWL_Barcode*>(m_pNormalWidget.get());
if (!pBarCodeWidget || pBarCodeWidget->IsProtectedType())
return false;
- if (!m_pNode->IsOpenAccess())
+ if (command == FWL_MouseCommand::LeftButtonDown && !m_pNode->IsOpenAccess())
return false;
- return CXFA_FFTextEdit::OnLButtonDown(dwFlags, point);
-}
-bool CXFA_FFBarcode::OnRButtonDown(uint32_t dwFlags, const CFX_PointF& point) {
- auto* pBarCodeWidget = static_cast<CFWL_Barcode*>(m_pNormalWidget.get());
- if (!pBarCodeWidget || pBarCodeWidget->IsProtectedType())
- return false;
- return CXFA_FFTextEdit::OnRButtonDown(dwFlags, point);
+ return CXFA_FFTextEdit::AcceptsFocusOnButtonDown(dwFlags, point, command);
}