mirror of
git://source.winehq.org/git/wine.git
synced 2024-09-02 14:13:48 +00:00
imm32: Use offsets instead of lengths to decide on sending updates.
The composition or result strings may be present, but with zero length. In which case we still want to send the messages, to indicate any change for instance whenever a character is deleted and strings become empty. Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=55055
This commit is contained in:
parent
d1f9aae599
commit
e564619172
|
@ -559,7 +559,7 @@ UINT WINAPI ImeToAsciiEx( UINT vkey, UINT vsc, BYTE *state, TRANSMSGLIST *msgs,
|
|||
TRANSMSG status_msg = {.message = ime_set_composition_status( himc, !!compstr->dwCompStrOffset )};
|
||||
if (status_msg.message) msgs->TransMsg[count++] = status_msg;
|
||||
|
||||
if (compstr->dwResultStrLen)
|
||||
if (compstr->dwResultStrOffset)
|
||||
{
|
||||
const WCHAR *result = (WCHAR *)((BYTE *)compstr + compstr->dwResultStrOffset);
|
||||
TRANSMSG msg = {.message = WM_IME_COMPOSITION, .wParam = result[0], .lParam = GCS_RESULTSTR};
|
||||
|
@ -567,7 +567,7 @@ UINT WINAPI ImeToAsciiEx( UINT vkey, UINT vsc, BYTE *state, TRANSMSGLIST *msgs,
|
|||
msgs->TransMsg[count++] = msg;
|
||||
}
|
||||
|
||||
if (compstr->dwCompStrLen)
|
||||
if (compstr->dwCompStrOffset)
|
||||
{
|
||||
const WCHAR *comp = (WCHAR *)((BYTE *)compstr + compstr->dwCompStrOffset);
|
||||
TRANSMSG msg = {.message = WM_IME_COMPOSITION, .wParam = comp[0], .lParam = GCS_COMPSTR | GCS_CURSORPOS | GCS_DELTASTART};
|
||||
|
|
Loading…
Reference in a new issue