imm32: Remove redundant IsWindow calls.
This commit is contained in:
parent
c84fd8586a
commit
c731ed30ac
|
@ -588,23 +588,9 @@ HIMC WINAPI ImmAssociateContext(HWND hWnd, HIMC hIMC)
|
||||||
if (!hIMC)
|
if (!hIMC)
|
||||||
return old;
|
return old;
|
||||||
|
|
||||||
if (IsWindow(data->IMC.hWnd))
|
|
||||||
{
|
|
||||||
/*
|
|
||||||
* Post a message that your context is switching
|
|
||||||
*/
|
|
||||||
SendMessageW(data->IMC.hWnd, WM_IME_SETCONTEXT, FALSE, ISC_SHOWUIALL);
|
SendMessageW(data->IMC.hWnd, WM_IME_SETCONTEXT, FALSE, ISC_SHOWUIALL);
|
||||||
}
|
|
||||||
|
|
||||||
data->IMC.hWnd = hWnd;
|
data->IMC.hWnd = hWnd;
|
||||||
|
|
||||||
if (IsWindow(data->IMC.hWnd))
|
|
||||||
{
|
|
||||||
/*
|
|
||||||
* Post a message that your context is switching
|
|
||||||
*/
|
|
||||||
SendMessageW(data->IMC.hWnd, WM_IME_SETCONTEXT, TRUE, ISC_SHOWUIALL);
|
SendMessageW(data->IMC.hWnd, WM_IME_SETCONTEXT, TRUE, ISC_SHOWUIALL);
|
||||||
}
|
|
||||||
|
|
||||||
return old;
|
return old;
|
||||||
}
|
}
|
||||||
|
@ -2185,12 +2171,10 @@ LRESULT WINAPI ImmRequestMessageA(HIMC hIMC, WPARAM wParam, LPARAM lParam)
|
||||||
InputContextData *data = get_imc_data(hIMC);
|
InputContextData *data = get_imc_data(hIMC);
|
||||||
|
|
||||||
TRACE("%p %ld %ld\n", hIMC, wParam, wParam);
|
TRACE("%p %ld %ld\n", hIMC, wParam, wParam);
|
||||||
if (!data)
|
|
||||||
|
if (data) return SendMessageA(data->IMC.hWnd, WM_IME_REQUEST, wParam, lParam);
|
||||||
|
|
||||||
SetLastError(ERROR_INVALID_HANDLE);
|
SetLastError(ERROR_INVALID_HANDLE);
|
||||||
|
|
||||||
if (data && IsWindow(data->IMC.hWnd))
|
|
||||||
return SendMessageA(data->IMC.hWnd, WM_IME_REQUEST, wParam, lParam);
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2203,12 +2187,9 @@ LRESULT WINAPI ImmRequestMessageW(HIMC hIMC, WPARAM wParam, LPARAM lParam)
|
||||||
|
|
||||||
TRACE("%p %ld %ld\n", hIMC, wParam, wParam);
|
TRACE("%p %ld %ld\n", hIMC, wParam, wParam);
|
||||||
|
|
||||||
if (!data)
|
if (data) return SendMessageW(data->IMC.hWnd, WM_IME_REQUEST, wParam, lParam);
|
||||||
|
|
||||||
SetLastError(ERROR_INVALID_HANDLE);
|
SetLastError(ERROR_INVALID_HANDLE);
|
||||||
|
|
||||||
if (data && IsWindow(data->IMC.hWnd))
|
|
||||||
return SendMessageW(data->IMC.hWnd, WM_IME_REQUEST, wParam, lParam);
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue