Aric Stewart : imm32: All HIMCC in the InputContext should be initialized at creation.
Alexandre Julliard
julliard at winehq.org
Mon Apr 14 07:14:22 CDT 2008
Module: wine
Branch: master
Commit: 3dde049f31efb63013be2b01f5a08d6457222dff
URL: http://source.winehq.org/git/wine.git/?a=commit;h=3dde049f31efb63013be2b01f5a08d6457222dff
Author: Aric Stewart <aric at codeweavers.com>
Date: Fri Apr 11 10:58:42 2008 -0500
imm32: All HIMCC in the InputContext should be initialized at creation.
---
dlls/imm32/imm.c | 16 ++++++++++++++--
include/ddk/imm.h | 18 ++++++++++++++++++
2 files changed, 32 insertions(+), 2 deletions(-)
diff --git a/dlls/imm32/imm.c b/dlls/imm32/imm.c
index 3ff2228..ff6398c 100644
--- a/dlls/imm32/imm.c
+++ b/dlls/imm32/imm.c
@@ -496,6 +496,8 @@ BOOL WINAPI ImmConfigureIMEW(
HIMC WINAPI ImmCreateContext(void)
{
InputContextData *new_context;
+ LPGUIDELINE gl;
+ LPCANDIDATEINFO ci;
new_context = HeapAlloc(GetProcessHeap(),HEAP_ZERO_MEMORY,sizeof(InputContextData));
@@ -509,9 +511,19 @@ HIMC WINAPI ImmCreateContext(void)
return 0;
}
- /* hCompStr is never NULL */
+ /* the HIMCCs are never NULL */
new_context->IMC.hCompStr = ImmCreateBlankCompStr();
- new_context->IMC.hMsgBuf = ImmCreateIMCC(1);
+ new_context->IMC.hMsgBuf = ImmCreateIMCC(0);
+ new_context->IMC.hCandInfo = ImmCreateIMCC(sizeof(CANDIDATEINFO));
+ ci = ImmLockIMCC(new_context->IMC.hCandInfo);
+ memset(ci,0,sizeof(CANDIDATEINFO));
+ ci->dwSize = sizeof(CANDIDATEINFO);
+ ImmUnlockIMCC(new_context->IMC.hCandInfo);
+ new_context->IMC.hGuideLine = ImmCreateIMCC(sizeof(GUIDELINE));
+ gl = ImmLockIMCC(new_context->IMC.hGuideLine);
+ memset(gl,0,sizeof(GUIDELINE));
+ gl->dwSize = sizeof(GUIDELINE);
+ ImmUnlockIMCC(new_context->IMC.hGuideLine);
/* Initialize the IME Private */
new_context->IMC.hPrivate = ImmCreateIMCC(new_context->immKbd->imeInfo.dwPrivateDataSize);
diff --git a/include/ddk/imm.h b/include/ddk/imm.h
index c492092..ee10b27 100644
--- a/include/ddk/imm.h
+++ b/include/ddk/imm.h
@@ -84,6 +84,24 @@ typedef struct tagCOMPOSITIONSTRING {
DWORD dwPrivateOffset;
} COMPOSITIONSTRING, *LPCOMPOSITIONSTRING;
+typedef struct tagGUIDELINE {
+ DWORD dwSize;
+ DWORD dwLevel;
+ DWORD dwIndex;
+ DWORD dwStrLen;
+ DWORD dwStrOffset;
+ DWORD dwPrivateSize;
+ DWORD dwPrivateOffset;
+} GUIDELINE, *LPGUIDELINE;
+
+typedef struct tagCANDIDATEINFO {
+ DWORD dwSize;
+ DWORD dwCount;
+ DWORD dwOffset[32];
+ DWORD dwPrivateSize;
+ DWORD dwPrivateOffset;
+} CANDIDATEINFO, *LPCANDIDATEINFO;
+
LPINPUTCONTEXT WINAPI ImmLockIMC(HIMC);
BOOL WINAPI ImmUnlockIMC(HIMC);
DWORD WINAPI ImmGetIMCLockCount(HIMC);
More information about the wine-cvs
mailing list