https://git.reactos.org/?p=reactos.git;a=commitdiff;h=22f883278b53d1c81f76a…
commit 22f883278b53d1c81f76a4f6923c6552dba0c7a9
Author: Katayama Hirofumi MZ <katayama.hirofumi.mz(a)gmail.com>
AuthorDate: Thu Dec 26 19:08:01 2019 +0900
Commit: GitHub <noreply(a)github.com>
CommitDate: Thu Dec 26 19:08:01 2019 +0900
[NTUSER] Fix caret display mistake (#2180)
Take care of caret visibility. co_IntSetCaretPos function wrongly drawn the caret upon
invisible caret. @Doug-Lyons did test this patch. CORE-15661
---
win32ss/user/ntuser/caret.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/win32ss/user/ntuser/caret.c b/win32ss/user/ntuser/caret.c
index 9ab590c0b83..24fadf6e16e 100644
--- a/win32ss/user/ntuser/caret.c
+++ b/win32ss/user/ntuser/caret.c
@@ -217,10 +217,13 @@ co_IntSetCaretPos(int X, int Y)
if(ThreadQueue->CaretInfo.Pos.x != X || ThreadQueue->CaretInfo.Pos.y != Y)
{
co_IntHideCaret(&ThreadQueue->CaretInfo);
- ThreadQueue->CaretInfo.Showing = 1;
ThreadQueue->CaretInfo.Pos.x = X;
ThreadQueue->CaretInfo.Pos.y = Y;
- co_IntDrawCaret(pWnd, &ThreadQueue->CaretInfo);
+ if (ThreadQueue->CaretInfo.Visible)
+ {
+ ThreadQueue->CaretInfo.Showing = 1;
+ co_IntDrawCaret(pWnd, &ThreadQueue->CaretInfo);
+ }
IntSetTimer(pWnd, IDCARETTIMER, gpsi->dtCaretBlink, CaretSystemTimerProc,
TMRF_SYSTEM);
IntNotifyWinEvent(EVENT_OBJECT_LOCATIONCHANGE, pWnd, OBJID_CARET, CHILDID_SELF,
0);