Aric Stewart : imm32: ImmNotifyIMM with CPS_CANCEL fully clears the composition string. Also enable respective tests.
Alexandre Julliard
julliard at winehq.org
Mon Jan 7 08:39:24 CST 2008
Module: wine
Branch: master
Commit: 6bc088b28cef4ebc0362f217eef0c4a891054d1d
URL: http://source.winehq.org/git/wine.git/?a=commit;h=6bc088b28cef4ebc0362f217eef0c4a891054d1d
Author: Aric Stewart <aric at codeweavers.com>
Date: Fri Jan 4 12:22:03 2008 -0600
imm32: ImmNotifyIMM with CPS_CANCEL fully clears the composition string. Also enable respective tests.
---
dlls/imm32/imm.c | 11 +++++++----
dlls/imm32/tests/imm32.c | 4 ----
2 files changed, 7 insertions(+), 8 deletions(-)
diff --git a/dlls/imm32/imm.c b/dlls/imm32/imm.c
index da39261..4acbde3 100644
--- a/dlls/imm32/imm.c
+++ b/dlls/imm32/imm.c
@@ -1406,15 +1406,18 @@ BOOL WINAPI ImmNotifyIME(
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;
+ root_context->IMC.hCompStr = NULL;
- ImmInternalPostIMEMessage(WM_IME_COMPOSITION, 0,
+ if (send)
+ ImmInternalPostIMEMessage(WM_IME_COMPOSITION, 0,
GCS_COMPSTR);
rc = TRUE;
}
diff --git a/dlls/imm32/tests/imm32.c b/dlls/imm32/tests/imm32.c
index 895c801..d948f54 100644
--- a/dlls/imm32/tests/imm32.c
+++ b/dlls/imm32/tests/imm32.c
@@ -183,11 +183,9 @@ static int test_ImmNotifyIME(void) {
ok(ImmNotifyIME(imc, NI_COMPOSITIONSTR, CPS_CANCEL, 0), "Canceling an "
"empty composition string succeeds.\n");
- todo_wine {
ok(!msg_spy_find_msg(WM_IME_COMPOSITION), "Windows does not post "
"WM_IME_COMPOSITION in response to NI_COMPOSITIONSTR / CPS_CANCEL, if "
"the composition string being canceled is empty.\n");
- }
msg_spy_flush_msgs();
@@ -203,11 +201,9 @@ static int test_ImmNotifyIME(void) {
ok(ImmNotifyIME(imc, NI_COMPOSITIONSTR, CPS_CANCEL, 0), "Canceling an "
"empty composition string succeeds.\n");
- todo_wine {
ok(!msg_spy_find_msg(WM_IME_COMPOSITION), "Windows does not post "
"WM_IME_COMPOSITION in response to NI_COMPOSITIONSTR / CPS_CANCEL, if "
"the composition string being canceled is empty.\n");
- }
msg_spy_flush_msgs();
ImmReleaseContext(hwnd, imc);
More information about the wine-cvs
mailing list