https://bugs.winehq.org/show_bug.cgi?id=55055
Bug ID: 55055 Summary: Japanese IME fails to clear composition string when deleting the only remaining character Product: Wine Version: 8.10 Hardware: x86-64 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: imm32 Assignee: wine-bugs@winehq.org Reporter: achurch+wine@achurch.org Distribution: ---
Created attachment 74617 --> https://bugs.winehq.org/attachment.cgi?id=74617 PoC patch
Environment: Linux, LANG=ja_JP.UTF-8, ATOK X3 (XIM)
Since Wine 8.9 (and possibly 8.8, but not in 8.7), if XIM input results in a composition string being reduced to zero length, the previous composition string remains displayed until further input. For example, using Japanese:
1) Press 'A' -> composition string "あ" -> program displays "あ" 2) Press backspace -> composition string empty -> program still displays "あ" 3) Press 'I' -> composition string "I" -> program displays "い"
In step 2, the program should no longer display a composition string, but the "あ" from step 1 remains displayed until further input in step 3 (at which point the displayed composition string is correct again).
I first observed this in Final Fantasy XIV, but it reproduces in Notepad as well.
Changing dlls/imm32/ime.c:ImeToAsciiEx() to send WM_IME_ENDCOMPOSITION when compstr->dwCompStrLen is zero (see attached patch) seems to fix the bug without any side effects in FFXIV and Notepad, but I have no idea what other effects this might have, or if there needs to be some sort of deeper state tracking for a proper fix.
https://bugs.winehq.org/show_bug.cgi?id=55055
--- Comment #1 from Andrew Church achurch+wine@achurch.org --- Step 3 should read: 3) Press 'I' -> composition string "い" -> program displays "い"
https://bugs.winehq.org/show_bug.cgi?id=55055
Fabian Maurer dark.shadow4@web.de changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |dark.shadow4@web.de
--- Comment #2 from Fabian Maurer dark.shadow4@web.de --- Is this fixed by https://gitlab.winehq.org/wine/wine/-/commit/e5646191723fa4b5e4cb38187e1611a... ?
https://bugs.winehq.org/show_bug.cgi?id=55055
Andrew Church achurch+wine@achurch.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Resolution|--- |FIXED
--- Comment #3 from Andrew Church achurch+wine@achurch.org --- That commit appears to fix the bug, thanks. It does leave an issue in FFXIV in which the game does not accept backspace inputs after backspacing the last character of a composition string, but this occurred in Wine 8.7 and earlier as well so it may be a separate issue; I'll file a separate bug for that.
https://bugs.winehq.org/show_bug.cgi?id=55055
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #4 from Alexandre Julliard julliard@winehq.org --- Closing bugs fixed in 8.11.