summaryrefslogtreecommitdiff
path: root/xfa/fwl/cfwl_caret.cpp
diff options
context:
space:
mode:
authorHenrique Nakashima <hnakashima@chromium.org>2018-04-25 22:01:14 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-04-25 22:01:14 +0000
commitecc1b271aba7d785426b4488dde754e5ce5e4313 (patch)
tree317e00405c3841bce188875deda6a422d151ab87 /xfa/fwl/cfwl_caret.cpp
parent36a8c861ea7a77ceb018ea4a494ae497d39437e5 (diff)
downloadpdfium-ecc1b271aba7d785426b4488dde754e5ce5e4313.tar.xz
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 <dsinclair@chromium.org> Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
Diffstat (limited to 'xfa/fwl/cfwl_caret.cpp')
-rw-r--r--xfa/fwl/cfwl_caret.cpp1
1 files changed, 1 insertions, 0 deletions
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() {