Commit d0a88bf7 authored by Rémi Bernon's avatar Rémi Bernon Committed by Alexandre Julliard

imm32: Use INPUTCONTEXT directly in ImmSetStatusWindowPos.

parent e49feacd
......@@ -2698,25 +2698,28 @@ BOOL WINAPI ImmSetOpenStatus( HIMC himc, BOOL status )
/***********************************************************************
* ImmSetStatusWindowPos (IMM32.@)
*/
BOOL WINAPI ImmSetStatusWindowPos(HIMC hIMC, LPPOINT lpptPos)
BOOL WINAPI ImmSetStatusWindowPos( HIMC himc, POINT *pos )
{
struct imc *data = get_imc_data( hIMC );
INPUTCONTEXT *ctx;
TRACE("(%p, %p)\n", hIMC, lpptPos);
TRACE( "himc %p, pos %s\n", himc, wine_dbgstr_point( pos ) );
if (!data || !lpptPos)
if (!pos)
{
SetLastError(ERROR_INVALID_HANDLE);
SetLastError( ERROR_INVALID_HANDLE );
return FALSE;
}
if (NtUserQueryInputContext( hIMC, NtUserInputContextThreadId ) != GetCurrentThreadId()) return FALSE;
if (NtUserQueryInputContext( himc, NtUserInputContextThreadId ) != GetCurrentThreadId()) return FALSE;
if (!(ctx = ImmLockIMC( himc ))) return FALSE;
TRACE("\t%s\n", wine_dbgstr_point(lpptPos));
ctx->ptStatusWndPos = *pos;
ctx->fdwInit |= INIT_STATUSWNDPOS;
data->IMC.ptStatusWndPos = *lpptPos;
ImmNotifyIME( hIMC, NI_CONTEXTUPDATED, 0, IMC_SETSTATUSWINDOWPOS);
imc_notify_ime( data, IMN_SETSTATUSWINDOWPOS, 0 );
ImmNotifyIME( himc, NI_CONTEXTUPDATED, 0, IMC_SETSTATUSWINDOWPOS );
SendMessageW( ctx->hWnd, WM_IME_NOTIFY, IMN_SETSTATUSWINDOWPOS, 0 );
ImmUnlockIMC( himc );
return TRUE;
}
......
......@@ -6188,7 +6188,7 @@ static void test_ImmSetStatusWindowPos(void)
.hkl = expect_ime, .himc = 0/*himc*/,
.func = IME_NOTIFY, .notify = {.action = NI_CONTEXTUPDATED, .index = 0, .value = IMC_SETSTATUSWINDOWPOS},
},
{.todo = TRUE},
{0},
};
INPUTCONTEXT *ctx;
POINT pos;
......@@ -6235,7 +6235,7 @@ static void test_ImmSetStatusWindowPos(void)
ctx->fdwInit = 0;
ok_ret( 1, ImmSetStatusWindowPos( himc, &pos ) );
ok_seq( set_status_window_pos_0_seq );
todo_wine ok_eq( INIT_STATUSWNDPOS, ctx->fdwInit, UINT, "%u" );
ok_eq( INIT_STATUSWNDPOS, ctx->fdwInit, UINT, "%u" );
ok_ret( 1, ImmSetStatusWindowPos( himc, &pos ) );
ok_seq( set_status_window_pos_0_seq );
......
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