summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--fpdfsdk/src/fsdk_mgr.cpp15
1 files changed, 12 insertions, 3 deletions
diff --git a/fpdfsdk/src/fsdk_mgr.cpp b/fpdfsdk/src/fsdk_mgr.cpp
index 401da497f1..4d2dbc166c 100644
--- a/fpdfsdk/src/fsdk_mgr.cpp
+++ b/fpdfsdk/src/fsdk_mgr.cpp
@@ -669,7 +669,7 @@ void CPDFSDK_PageView::PageView_OnDraw(CFX_RenderDevice* pDevice,
#ifdef PDF_ENABLE_XFA
CPDFXFA_Page* pPage = GetPDFXFAPage();
- if (pPage == NULL)
+ if (!pPage)
return;
if (pPage->GetDocument()->GetDocType() == DOCTYPE_DYNAMIC_XFA) {
@@ -686,11 +686,20 @@ void CPDFSDK_PageView::PageView_OnDraw(CFX_RenderDevice* pDevice,
return;
CXFA_RenderOptions renderOptions;
renderOptions.m_bHighlight = TRUE;
- pRenderContext->StartRender(pPage->GetXFAPageView(), &gs, *pUser2Device,
- renderOptions);
+ IXFA_PageView* xfaView = pPage->GetXFAPageView();
+ pRenderContext->StartRender(xfaView, &gs, *pUser2Device, renderOptions);
pRenderContext->DoRender();
pRenderContext->StopRender();
pRenderContext->Release();
+ IXFA_DocView* docView = xfaView->GetDocView();
+ if (!docView)
+ return;
+ CPDFSDK_Annot* annot = GetFocusAnnot();
+ if (!annot)
+ return;
+ // Render the focus widget
+ docView->GetWidgetHandler()->RenderWidget(annot->GetXFAWidget(), &gs,
+ pUser2Device, FALSE);
return;
}
#endif // PDF_ENABLE_XFA