forked from Mirrors/wine-wine
imm32: ImmNotifyIMM with CPS_CANCEL fully clears the composition string. Also enable respective tests.
parent
d7cbaf572a
commit
6bc088b28c
|
@ -1406,15 +1406,18 @@ BOOL WINAPI ImmNotifyIME(
|
||||||
case CPS_CANCEL:
|
case CPS_CANCEL:
|
||||||
TRACE("%s - %s\n","NI_COMPOSITIONSTR","CPS_CANCEL");
|
TRACE("%s - %s\n","NI_COMPOSITIONSTR","CPS_CANCEL");
|
||||||
{
|
{
|
||||||
HIMCC newCompStr;
|
BOOL send;
|
||||||
|
|
||||||
if (pX11DRV_ForceXIMReset)
|
if (pX11DRV_ForceXIMReset)
|
||||||
pX11DRV_ForceXIMReset(root_context->IMC.hWnd);
|
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,
|
ImmDestroyIMCC(root_context->IMC.hCompStr);
|
||||||
|
root_context->IMC.hCompStr = NULL;
|
||||||
|
|
||||||
|
if (send)
|
||||||
|
ImmInternalPostIMEMessage(WM_IME_COMPOSITION, 0,
|
||||||
GCS_COMPSTR);
|
GCS_COMPSTR);
|
||||||
rc = TRUE;
|
rc = TRUE;
|
||||||
}
|
}
|
||||||
|
|
|
@ -183,11 +183,9 @@ static int test_ImmNotifyIME(void) {
|
||||||
|
|
||||||
ok(ImmNotifyIME(imc, NI_COMPOSITIONSTR, CPS_CANCEL, 0), "Canceling an "
|
ok(ImmNotifyIME(imc, NI_COMPOSITIONSTR, CPS_CANCEL, 0), "Canceling an "
|
||||||
"empty composition string succeeds.\n");
|
"empty composition string succeeds.\n");
|
||||||
todo_wine {
|
|
||||||
ok(!msg_spy_find_msg(WM_IME_COMPOSITION), "Windows does not post "
|
ok(!msg_spy_find_msg(WM_IME_COMPOSITION), "Windows does not post "
|
||||||
"WM_IME_COMPOSITION in response to NI_COMPOSITIONSTR / CPS_CANCEL, if "
|
"WM_IME_COMPOSITION in response to NI_COMPOSITIONSTR / CPS_CANCEL, if "
|
||||||
"the composition string being canceled is empty.\n");
|
"the composition string being canceled is empty.\n");
|
||||||
}
|
|
||||||
|
|
||||||
msg_spy_flush_msgs();
|
msg_spy_flush_msgs();
|
||||||
|
|
||||||
|
@ -203,11 +201,9 @@ static int test_ImmNotifyIME(void) {
|
||||||
|
|
||||||
ok(ImmNotifyIME(imc, NI_COMPOSITIONSTR, CPS_CANCEL, 0), "Canceling an "
|
ok(ImmNotifyIME(imc, NI_COMPOSITIONSTR, CPS_CANCEL, 0), "Canceling an "
|
||||||
"empty composition string succeeds.\n");
|
"empty composition string succeeds.\n");
|
||||||
todo_wine {
|
|
||||||
ok(!msg_spy_find_msg(WM_IME_COMPOSITION), "Windows does not post "
|
ok(!msg_spy_find_msg(WM_IME_COMPOSITION), "Windows does not post "
|
||||||
"WM_IME_COMPOSITION in response to NI_COMPOSITIONSTR / CPS_CANCEL, if "
|
"WM_IME_COMPOSITION in response to NI_COMPOSITIONSTR / CPS_CANCEL, if "
|
||||||
"the composition string being canceled is empty.\n");
|
"the composition string being canceled is empty.\n");
|
||||||
}
|
|
||||||
|
|
||||||
msg_spy_flush_msgs();
|
msg_spy_flush_msgs();
|
||||||
ImmReleaseContext(hwnd, imc);
|
ImmReleaseContext(hwnd, imc);
|
||||||
|
|
Loading…
Reference in New Issue