Commit 3311684e authored by Piotr Caban's avatar Piotr Caban Committed by Alexandre Julliard

imm32: Return FALSE on WM_MSIME_* messages in ImmIsUIMessage.

parent 24de8560
......@@ -1945,28 +1945,20 @@ BOOL WINAPI ImmIsIME(HKL hKL)
BOOL WINAPI ImmIsUIMessageA(
HWND hWndIME, UINT msg, WPARAM wParam, LPARAM lParam)
{
BOOL rc = FALSE;
TRACE("(%p, %x, %ld, %ld)\n", hWndIME, msg, wParam, lParam);
if ((msg >= WM_IME_STARTCOMPOSITION && msg <= WM_IME_KEYLAST) ||
(msg == WM_IME_SETCONTEXT) ||
(msg == WM_IME_NOTIFY) ||
(msg == WM_IME_COMPOSITIONFULL) ||
(msg == WM_IME_SELECT) ||
(msg == 0x287 /* FIXME: WM_IME_SYSTEM */) ||
(msg == WM_MSIME_RECONVERTOPTIONS) ||
(msg == WM_MSIME_MOUSE) ||
(msg == WM_MSIME_RECONVERTREQUEST) ||
(msg == WM_MSIME_RECONVERT) ||
(msg == WM_MSIME_QUERYPOSITION) ||
(msg == WM_MSIME_DOCUMENTFEED))
(msg == 0x287 /* FIXME: WM_IME_SYSTEM */))
{
if (hWndIME)
SendMessageA(hWndIME, msg, wParam, lParam);
rc = TRUE;
return TRUE;
}
return rc;
return FALSE;
}
/***********************************************************************
......@@ -1975,28 +1967,20 @@ BOOL WINAPI ImmIsUIMessageA(
BOOL WINAPI ImmIsUIMessageW(
HWND hWndIME, UINT msg, WPARAM wParam, LPARAM lParam)
{
BOOL rc = FALSE;
TRACE("(%p, %x, %ld, %ld)\n", hWndIME, msg, wParam, lParam);
if ((msg >= WM_IME_STARTCOMPOSITION && msg <= WM_IME_KEYLAST) ||
(msg == WM_IME_SETCONTEXT) ||
(msg == WM_IME_NOTIFY) ||
(msg == WM_IME_COMPOSITIONFULL) ||
(msg == WM_IME_SELECT) ||
(msg == 0x287 /* FIXME: WM_IME_SYSTEM */) ||
(msg == WM_MSIME_RECONVERTOPTIONS) ||
(msg == WM_MSIME_MOUSE) ||
(msg == WM_MSIME_RECONVERTREQUEST) ||
(msg == WM_MSIME_RECONVERT) ||
(msg == WM_MSIME_QUERYPOSITION) ||
(msg == WM_MSIME_DOCUMENTFEED))
(msg == 0x287 /* FIXME: WM_IME_SYSTEM */))
{
if (hWndIME)
SendMessageW(hWndIME, msg, wParam, lParam);
rc = TRUE;
return TRUE;
}
return rc;
return FALSE;
}
/***********************************************************************
......
......@@ -607,6 +607,14 @@ static void test_ImmIsUIMessage(void)
{ 0, FALSE } /* mark the end */
};
UINT WM_MSIME_SERVICE = RegisterWindowMessageA("MSIMEService");
UINT WM_MSIME_RECONVERTOPTIONS = RegisterWindowMessageA("MSIMEReconvertOptions");
UINT WM_MSIME_MOUSE = RegisterWindowMessageA("MSIMEMouseOperation");
UINT WM_MSIME_RECONVERTREQUEST = RegisterWindowMessageA("MSIMEReconvertRequest");
UINT WM_MSIME_RECONVERT = RegisterWindowMessageA("MSIMEReconvert");
UINT WM_MSIME_QUERYPOSITION = RegisterWindowMessageA("MSIMEQueryPosition");
UINT WM_MSIME_DOCUMENTFEED = RegisterWindowMessageA("MSIMEDocumentFeed");
const struct test *test;
BOOL ret;
......@@ -626,6 +634,21 @@ static void test_ImmIsUIMessage(void)
else
ok(!msg_spy_find_msg(test->msg), "Windows does not send 0x%x\n", test->msg);
}
ret = pImmIsUIMessageA(NULL, WM_MSIME_SERVICE, 0, 0);
ok(!ret, "ImmIsUIMessageA returned TRUE for WM_MSIME_SERVICE\n");
ret = pImmIsUIMessageA(NULL, WM_MSIME_RECONVERTOPTIONS, 0, 0);
ok(!ret, "ImmIsUIMessageA returned TRUE for WM_MSIME_RECONVERTOPTIONS\n");
ret = pImmIsUIMessageA(NULL, WM_MSIME_MOUSE, 0, 0);
ok(!ret, "ImmIsUIMessageA returned TRUE for WM_MSIME_MOUSE\n");
ret = pImmIsUIMessageA(NULL, WM_MSIME_RECONVERTREQUEST, 0, 0);
ok(!ret, "ImmIsUIMessageA returned TRUE for WM_MSIME_RECONVERTREQUEST\n");
ret = pImmIsUIMessageA(NULL, WM_MSIME_RECONVERT, 0, 0);
ok(!ret, "ImmIsUIMessageA returned TRUE for WM_MSIME_RECONVERT\n");
ret = pImmIsUIMessageA(NULL, WM_MSIME_QUERYPOSITION, 0, 0);
ok(!ret, "ImmIsUIMessageA returned TRUE for WM_MSIME_QUERYPOSITION\n");
ret = pImmIsUIMessageA(NULL, WM_MSIME_DOCUMENTFEED, 0, 0);
ok(!ret, "ImmIsUIMessageA returned TRUE for WM_MSIME_DOCUMENTFEED\n");
}
static void test_ImmGetContext(void)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment