[PATCH] user32/edit: Don't set caret position when we don't have focus.
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair(a)hotmail.com> --- dlls/user32/edit.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/dlls/user32/edit.c b/dlls/user32/edit.c index 48c65ea..6f8f412 100644 --- a/dlls/user32/edit.c +++ b/dlls/user32/edit.c @@ -1799,9 +1799,14 @@ static LRESULT EDIT_EM_Scroll(EDITSTATE *es, INT action) static void EDIT_SetCaretPos(EDITSTATE *es, INT pos, BOOL after_wrap) { - LRESULT res = EDIT_EM_PosFromChar(es, pos, after_wrap); - TRACE("%d - %dx%d\n", pos, (short)LOWORD(res), (short)HIWORD(res)); - SetCaretPos((short)LOWORD(res), (short)HIWORD(res)); + LRESULT res; + + if (es->flags & EF_FOCUSED) + { + res = EDIT_EM_PosFromChar(es, pos, after_wrap); + TRACE("%d - %dx%d\n", pos, (short)LOWORD(res), (short)HIWORD(res)); + SetCaretPos((short)LOWORD(res), (short)HIWORD(res)); + } } @@ -1870,7 +1875,6 @@ static void EDIT_EM_ScrollCaret(EDITSTATE *es) } } - if(es->flags & EF_FOCUSED) EDIT_SetCaretPos(es, es->selection_end, es->flags & EF_AFTER_WRAP); } -- 1.9.1
Hi, While running your changed tests on Windows, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check? Full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=45530 Your paranoid android. === debian9 (32 bit report) === user32: menu.c:2354: Test failed: test 25 menu: Timeout === debian9 (64 bit WoW report) === user32: input.c:2054: Test failed: expected WM_NCHITTEST message
Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> Same change was already made to comctl32 copy.
participants (3)
-
Alistair Leslie-Hughes -
Marvin -
Nikolay Sivov