Comming in a bit late on this one, (missed the patch submission)
I do not think this is correct as far as i know hCompStr should never be NULL. Much of our code depends on that not being NULL.
I would recommend using ImeCreateBlankCompStr instead. (something like below)
diff --git a/dlls/winex11.drv/ime.c b/dlls/winex11.drv/ime.c index f50549f..8fa6f6f 100644 --- a/dlls/winex11.drv/ime.c +++ b/dlls/winex11.drv/ime.c @@ -778,7 +778,7 @@ BOOL WINAPI NotifyIME(HIMC hIMC, DWORD dwAction, DWORD dwInd if (lpIMC->hCompStr) { ImmDestroyIMCC(lpIMC->hCompStr); - lpIMC->hCompStr = NULL; + lpIMC->hCompStr = ImeCreateBlankCompStr(); }
myPrivate = (LPIMEPRIVATE)ImmLockIMCC(lpIMC->hPrivate);
-aric
Alexandre Julliard wrote:
Module: wine Branch: master Commit: 4f2330ac0c951ec5fb05e2fb152c59723c3af336 URL: http://source.winehq.org/git/wine.git/?a=commit;h=4f2330ac0c951ec5fb05e2fb15...
Author: Kusanagi Kouichi slash@ma.neweb.ne.jp Date: Fri Apr 25 12:08:24 2008 +0900
winex11: Destroy the handle to the composition string after it is cancelled.
dlls/winex11.drv/ime.c | 6 ++++++ 1 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/dlls/winex11.drv/ime.c b/dlls/winex11.drv/ime.c index 6614213..f50549f 100644 --- a/dlls/winex11.drv/ime.c +++ b/dlls/winex11.drv/ime.c @@ -775,6 +775,12 @@ BOOL WINAPI NotifyIME(HIMC hIMC, DWORD dwAction, DWORD dwIndex, DWORD dwValue)
X11DRV_ForceXIMReset(lpIMC->hWnd);
if (lpIMC->hCompStr)
{
ImmDestroyIMCC(lpIMC->hCompStr);
lpIMC->hCompStr = NULL;
}
myPrivate = (LPIMEPRIVATE)ImmLockIMCC(lpIMC->hPrivate); if (myPrivate->bInComposition) {