Fix Cursor Position in "...file name:" box when opening from Explorer 'Search' toolbar (#6333)

Original patch by @I_Kill_Bugs.
Fix Cursor being in middle of '...file name:' edit box when using 'Search' from the Explorer toolbar.

JIRA issue: CORE-19407
This commit is contained in:
Doug Lyons 2024-01-17 09:42:18 -06:00 committed by GitHub
parent 2505489d29
commit fb43301bad
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 10 additions and 0 deletions

View file

@ -1752,6 +1752,11 @@ static void EDIT_SetCaretPos(EDITSTATE *es, INT pos,
#ifdef __REACTOS__
HKL hKL = GetKeyboardLayout(0);
POINT pt = { (short)LOWORD(res), (short)HIWORD(res) };
/* Don't set caret if not focused */
if ((es->flags & EF_FOCUSED) == 0)
return;
SetCaretPos(pt.x, pt.y);
if (!ImmIsIME(hKL))

View file

@ -1907,6 +1907,11 @@ static void EDIT_SetCaretPos(EDITSTATE *es, INT pos,
#ifdef __REACTOS__
HKL hKL = GetKeyboardLayout(0);
POINT pt = { (short)LOWORD(res), (short)HIWORD(res) };
/* Don't set caret if not focused */
if ((es->flags & EF_FOCUSED) == 0)
return;
SetCaretPos(pt.x, pt.y);
if (!ImmIsIME(hKL))