From 63d2d041d9bd93f0206b984ad49024b6d6eb0cbd Mon Sep 17 00:00:00 2001 From: Aric Stewart Date: Fri, 11 Apr 2008 07:42:24 -0500 Subject: [PATCH] imm32: Remember to unset the hwnd for a context when that hwnd is associated with a different context. --- dlls/imm32/imm.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/dlls/imm32/imm.c b/dlls/imm32/imm.c index 000052c1fdc..3ff2228d02b 100644 --- a/dlls/imm32/imm.c +++ b/dlls/imm32/imm.c @@ -383,6 +383,13 @@ HIMC WINAPI ImmAssociateContext(HWND hWnd, HIMC hIMC) else SetPropW(hWnd,szwWineIMCProperty,(HANDLE)hIMC); } + + if (old) + { + InputContextData *old_data = (InputContextData*)old; + if (old_data->IMC.hWnd == hWnd) + old_data->IMC.hWnd = NULL; + } } if (!hIMC)