Akihiro Sagawa : winemac: Keep the result string in the IME UI window procedure.
Alexandre Julliard
julliard at winehq.org
Thu Nov 16 15:21:10 CST 2017
Module: wine
Branch: master
Commit: fdd376e514cc0f581dccf05946b17b254ec0aca7
URL: http://source.winehq.org/git/wine.git/?a=commit;h=fdd376e514cc0f581dccf05946b17b254ec0aca7
Author: Akihiro Sagawa <sagawa.aki at gmail.com>
Date: Fri Nov 17 00:12:13 2017 +0900
winemac: Keep the result string in the IME UI window procedure.
This is winemac.drv port from winex11.drv.
Please refer to b8dc1e7cde64c212882958c0806b50911a360fb9.
Signed-off-by: Akihiro Sagawa <sagawa.aki at gmail.com>
Signed-off-by: Aric Stewart <aric at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/winemac.drv/ime.c | 11 +++++------
1 file changed, 5 insertions(+), 6 deletions(-)
diff --git a/dlls/winemac.drv/ime.c b/dlls/winemac.drv/ime.c
index 846f9bd..8ea6ae8 100644
--- a/dlls/winemac.drv/ime.c
+++ b/dlls/winemac.drv/ime.c
@@ -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
More information about the wine-cvs
mailing list