Commit fdd376e5 authored by Akihiro Sagawa's avatar Akihiro Sagawa Committed by Alexandre Julliard

winemac: Keep the result string in the IME UI window procedure.

This is winemac.drv port from winex11.drv. Please refer to b8dc1e7c. Signed-off-by: 's avatarAkihiro Sagawa <sagawa.aki@gmail.com> Signed-off-by: 's avatarAric Stewart <aric@codeweavers.com> Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
parent 0c7d67c5
......@@ -965,6 +965,11 @@ static BOOL IME_SetCompositionString(void* hIMC, DWORD dwIndex, LPCVOID lpComp,
myPrivate->bInComposition = TRUE;
}
/* clear existing result */
newCompStr = updateResultStr(lpIMC->hCompStr, NULL, 0);
ImmDestroyIMCC(lpIMC->hCompStr);
lpIMC->hCompStr = newCompStr;
flags = GCS_COMPSTR;
if (dwCompLen && lpComp)
......@@ -1166,7 +1171,6 @@ static void DefaultIMEComposition(HIMC hIMC, HWND hwnd, LPARAM lParam)
LPCOMPOSITIONSTRING compstr;
LPBYTE compdata;
LPWSTR ResultStr;
HIMCC newCompStr;
LPINPUTCONTEXT lpIMC;
lpIMC = LockRealIMC(hIMC);
......@@ -1179,11 +1183,6 @@ static void DefaultIMEComposition(HIMC hIMC, HWND hwnd, LPARAM lParam)
ResultStr = (LPWSTR)(compdata + compstr->dwResultStrOffset);
GenerateIMECHARMessages(hIMC, ResultStr, compstr->dwResultStrLen);
ImmUnlockIMCC(lpIMC->hCompStr);
/* clear the buffer */
newCompStr = updateResultStr(lpIMC->hCompStr, NULL, 0);
ImmDestroyIMCC(lpIMC->hCompStr);
lpIMC->hCompStr = newCompStr;
UnlockRealIMC(hIMC);
}
else
......
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