From: Rémi Bernon rbernon@codeweavers.com
--- dlls/imm32/ime.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/dlls/imm32/ime.c b/dlls/imm32/ime.c index dcea00c788b..77c485a2e83 100644 --- a/dlls/imm32/ime.c +++ b/dlls/imm32/ime.c @@ -284,19 +284,21 @@ static UINT ime_set_cursor_pos( HIMC himc, UINT new_pos ) { COMPOSITIONSTRING *string; INPUTCONTEXT *ctx; + UINT pos = 0;
TRACE( "himc %p, new_pos %u\n", himc, new_pos );
if (!(ctx = ImmLockIMC( himc ))) return 0; if ((string = ImmLockIMCC( ctx->hCompStr ))) { + pos = string->dwCursorPos; string->dwCursorPos = new_pos; ImmUnlockIMCC( ctx->hCompStr ); } ImmUnlockIMC( himc );
- ime_send_message( himc, WM_IME_COMPOSITION, new_pos, GCS_CURSORPOS ); - return 0; + if (pos != new_pos) ime_send_message( himc, WM_IME_COMPOSITION, new_pos, GCS_CURSORPOS ); + return pos; }
static LRESULT WINAPI ime_ui_window_proc( HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam )