mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 10:04:49 +00:00
[IMM32] Rewrite ImmSetStatusWindowPos (#3852)
Implementing Japanese input... CORE-11700
This commit is contained in:
parent
da2a5673e7
commit
a71de262d3
1 changed files with 17 additions and 13 deletions
|
@ -3129,25 +3129,29 @@ BOOL WINAPI ImmSetOpenStatus(HIMC hIMC, BOOL fOpen)
|
|||
*/
|
||||
BOOL WINAPI ImmSetStatusWindowPos(HIMC hIMC, LPPOINT lpptPos)
|
||||
{
|
||||
InputContextData *data = get_imc_data(hIMC);
|
||||
LPINPUTCONTEXT pIC;
|
||||
HWND hWnd;
|
||||
DWORD dwImeThreadId, dwThreadId;
|
||||
|
||||
TRACE("(%p, %p)\n", hIMC, lpptPos);
|
||||
TRACE("ImmSetStatusWindowPos(%p, {%ld, %ld})\n", hIMC, lpptPos->x, lpptPos->y);
|
||||
|
||||
if (!data || !lpptPos)
|
||||
{
|
||||
SetLastError(ERROR_INVALID_HANDLE);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if (IMM_IsCrossThreadAccess(NULL, hIMC))
|
||||
dwImeThreadId = Imm32QueryInputContext(hIMC, 1);
|
||||
dwThreadId = GetCurrentThreadId();
|
||||
if (dwImeThreadId != dwThreadId)
|
||||
return FALSE;
|
||||
|
||||
TRACE("\t%s\n", wine_dbgstr_point(lpptPos));
|
||||
pIC = ImmLockIMC(hIMC);
|
||||
if (!pIC)
|
||||
return FALSE;
|
||||
|
||||
data->IMC.ptStatusWndPos = *lpptPos;
|
||||
ImmNotifyIME( hIMC, NI_CONTEXTUPDATED, 0, IMC_SETSTATUSWINDOWPOS);
|
||||
ImmInternalSendIMENotify(data, IMN_SETSTATUSWINDOWPOS, 0);
|
||||
hWnd = pIC->hWnd;
|
||||
pIC->ptStatusWndPos = *lpptPos;
|
||||
pIC->fdwInit |= INIT_STATUSWNDPOS;
|
||||
|
||||
ImmUnlockIMC(hIMC);
|
||||
|
||||
Imm32NotifyAction(hIMC, hWnd, NI_CONTEXTUPDATED, 0,
|
||||
IMC_SETSTATUSWINDOWPOS, IMN_SETSTATUSWINDOWPOS, 0);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue