Module: wine Branch: master Commit: d63eccc602cb30b61e107c95c461e923d6e2faa8 URL: http://source.winehq.org/git/wine.git/?a=commit;h=d63eccc602cb30b61e107c95c4...
Author: Aric Stewart aric@codeweavers.com Date: Sat Sep 27 13:30:43 2008 -0500
imm32: ImmConfigureIME should return 0 when the type is IME_CONFIG_REGISTERWORD and the data is NULL.
---
dlls/imm32/imm.c | 6 ++++++ dlls/imm32/tests/imm32.c | 18 ++++++++++++++++++ 2 files changed, 24 insertions(+), 0 deletions(-)
diff --git a/dlls/imm32/imm.c b/dlls/imm32/imm.c index abcff55..2c9489a 100644 --- a/dlls/imm32/imm.c +++ b/dlls/imm32/imm.c @@ -513,6 +513,9 @@ BOOL WINAPI ImmConfigureIMEA(
TRACE("(%p, %p, %d, %p):\n", hKL, hWnd, dwMode, lpData);
+ if (dwMode == IME_CONFIG_REGISTERWORD && !lpData) + return FALSE; + if (immHkl->hIME && immHkl->pImeConfigure) { if (dwMode != IME_CONFIG_REGISTERWORD || !is_kbd_ime_unicode(immHkl)) @@ -545,6 +548,9 @@ BOOL WINAPI ImmConfigureIMEW(
TRACE("(%p, %p, %d, %p):\n", hKL, hWnd, dwMode, lpData);
+ if (dwMode == IME_CONFIG_REGISTERWORD && !lpData) + return FALSE; + if (immHkl->hIME && immHkl->pImeConfigure) { if (dwMode != IME_CONFIG_REGISTERWORD || is_kbd_ime_unicode(immHkl)) diff --git a/dlls/imm32/tests/imm32.c b/dlls/imm32/tests/imm32.c index 7208092..29ac553 100644 --- a/dlls/imm32/tests/imm32.c +++ b/dlls/imm32/tests/imm32.c @@ -254,11 +254,29 @@ static int test_ImmGetCompositionString(void) return 0; }
+static int test_ImmIME(void) +{ + HIMC imc; + + imc = ImmGetContext(hwnd); + if (imc) + { + BOOL rc; + rc = ImmConfigureIMEA(imc, NULL, IME_CONFIG_REGISTERWORD, NULL); + ok (rc == 0, "ImmConfigureIMEA did not fail\n"); + rc = ImmConfigureIMEW(imc, NULL, IME_CONFIG_REGISTERWORD, NULL); + ok (rc == 0, "ImmConfigureIMEW did not fail\n"); + } + ImmReleaseContext(hwnd,imc); + return 0; +} + START_TEST(imm32) { if (init()) { test_ImmNotifyIME(); test_ImmGetCompositionString(); + test_ImmIME(); } cleanup(); }