From ecc1b271aba7d785426b4488dde754e5ce5e4313 Mon Sep 17 00:00:00 2001 From: Henrique Nakashima Date: Wed, 25 Apr 2018 22:01:14 +0000 Subject: Make XFA Caret become immediately visible when moved. The timer resets when it moves, and the current starting state is not visible, so moving the caret around using keyboard keys, typing, the mouse, or switching focus has a 0.6s delay in showing its position. This change makes the form feel much more responsive. Change-Id: Iff38ade9be26d4c5283ee1268b3e2c307182738c Reviewed-on: https://pdfium-review.googlesource.com/31293 Reviewed-by: dsinclair Commit-Queue: Henrique Nakashima --- xfa/fwl/cfwl_caret.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/xfa/fwl/cfwl_caret.cpp b/xfa/fwl/cfwl_caret.cpp index c864b2d809..666ba8246f 100644 --- a/xfa/fwl/cfwl_caret.cpp +++ b/xfa/fwl/cfwl_caret.cpp @@ -65,6 +65,7 @@ void CFWL_Caret::ShowCaret() { m_pTimerInfo = m_pTimer->StartTimer(kBlinkPeriodMs, true); RemoveStates(FWL_WGTSTATE_Invisible); + SetStates(kStateHighlight); } void CFWL_Caret::HideCaret() { -- cgit v1.2.3