Author: winesync Date: Mon Jan 14 16:00:47 2008 New Revision: 31777
URL: http://svn.reactos.org/svn/reactos?rev=31777&view=rev Log: Autosyncing with Wine HEAD
Modified: trunk/reactos/dll/win32/imm32/imm.c trunk/reactos/dll/win32/imm32/imm32.rbuild
Modified: trunk/reactos/dll/win32/imm32/imm.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/imm32/imm.c?rev=3... ============================================================================== --- trunk/reactos/dll/win32/imm32/imm.c (original) +++ trunk/reactos/dll/win32/imm32/imm.c Mon Jan 14 16:00:47 2008 @@ -240,6 +240,9 @@
TRACE("%s, %i\n",debugstr_wn(compstr,len),len);
+ if (old == NULL && compstr == NULL && len == 0) + return NULL; + if (old != NULL) { olddata = ImmLockIMCC(old); @@ -373,6 +376,9 @@
TRACE("%s, %i\n",debugstr_wn(resultstr,len),len);
+ if (old == NULL && resultstr == NULL && len == 0) + return NULL; + if (old != NULL) { olddata = ImmLockIMCC(old); @@ -1076,7 +1082,7 @@ TRACE("Default created (%p)\n",hwndDefault); }
- return (HWND)hwndDefault; + return hwndDefault; }
/*********************************************************************** @@ -1400,15 +1406,18 @@ case CPS_CANCEL: TRACE("%s - %s\n","NI_COMPOSITIONSTR","CPS_CANCEL"); { - HIMCC newCompStr; + BOOL send; + if (pX11DRV_ForceXIMReset) pX11DRV_ForceXIMReset(root_context->IMC.hWnd);
- newCompStr = updateCompStr(root_context->IMC.hCompStr, NULL, 0); + send = (root_context->IMC.hCompStr!=NULL); + ImmDestroyIMCC(root_context->IMC.hCompStr); - root_context->IMC.hCompStr = newCompStr; - - ImmInternalPostIMEMessage(WM_IME_COMPOSITION, 0, + root_context->IMC.hCompStr = NULL; + + if (send) + ImmInternalPostIMEMessage(WM_IME_COMPOSITION, 0, GCS_COMPSTR); rc = TRUE; } @@ -1419,7 +1428,7 @@ pX11DRV_ForceXIMReset(root_context->IMC.hWnd); { HIMCC newCompStr; - DWORD cplen; + DWORD cplen = 0; LPWSTR cpstr; LPCOMPOSITIONSTRING cs = NULL; LPBYTE cdata = NULL; @@ -1429,11 +1438,14 @@ ImmDestroyIMCC(root_context->IMC.hCompStr); root_context->IMC.hCompStr = newCompStr;
- cdata = ImmLockIMCC(root_context->IMC.hCompStr); - cs = (LPCOMPOSITIONSTRING)cdata; - cplen = cs->dwCompStrLen; - cpstr = (LPWSTR)&(cdata[cs->dwCompStrOffset]); - ImmUnlockIMCC(root_context->IMC.hCompStr); + if (root_context->IMC.hCompStr) + { + cdata = ImmLockIMCC(root_context->IMC.hCompStr); + cs = (LPCOMPOSITIONSTRING)cdata; + cplen = cs->dwCompStrLen; + cpstr = (LPWSTR)&(cdata[cs->dwCompStrOffset]); + ImmUnlockIMCC(root_context->IMC.hCompStr); + } if (cplen > 0) { WCHAR param = cpstr[0];
Modified: trunk/reactos/dll/win32/imm32/imm32.rbuild URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/imm32/imm32.rbuil... ============================================================================== --- trunk/reactos/dll/win32/imm32/imm32.rbuild (original) +++ trunk/reactos/dll/win32/imm32/imm32.rbuild Mon Jan 14 16:00:47 2008 @@ -1,5 +1,6 @@ <?xml version="1.0"?> <!DOCTYPE module SYSTEM "../../../tools/rbuild/project.dtd"> +<group> <module name="imm32" type="win32dll" baseaddress="${BASEADDRESS_IMM32}" installbase="system32" installname="imm32.dll" allowwarnings="true"> <importlibrary definition="imm32.spec.def" /> <include base="imm32">.</include> @@ -16,3 +17,4 @@ <file>version.rc</file> <file>imm32.spec</file> </module> +</group>