Commit b17aa781 authored by Aric Stewart's avatar Aric Stewart Committed by Alexandre Julliard

imm32: Update CopyCompOffsetIMEtoClient to handle A->W and W->A conversions.

parent d8c91f58
...@@ -1132,7 +1132,20 @@ static INT CopyCompClauseIMEtoClient(InputContextData *data, LPBYTE source, INT ...@@ -1132,7 +1132,20 @@ static INT CopyCompClauseIMEtoClient(InputContextData *data, LPBYTE source, INT
static INT CopyCompOffsetIMEtoClient(InputContextData *data, DWORD offset, LPBYTE ssource, BOOL unicode) static INT CopyCompOffsetIMEtoClient(InputContextData *data, DWORD offset, LPBYTE ssource, BOOL unicode)
{ {
return offset; int rc;
if (is_himc_ime_unicode(data) && !unicode)
{
rc = WideCharToMultiByte(CP_ACP, 0, (LPWSTR)ssource, offset, NULL, 0, NULL, NULL);
}
else if (!is_himc_ime_unicode(data) && unicode)
{
rc = MultiByteToWideChar(CP_ACP, 0, (LPSTR)ssource, offset, NULL, 0);
}
else
rc = offset;
return rc;
} }
static LONG ImmGetCompositionStringT( HIMC hIMC, DWORD dwIndex, LPVOID lpBuf, static LONG ImmGetCompositionStringT( HIMC hIMC, DWORD dwIndex, LPVOID lpBuf,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment