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

imm32: Use INPUTCONTEXT directly in ImmGetCompositionWindow.

parent 048d2f0d
......@@ -1740,17 +1740,18 @@ LONG WINAPI ImmGetCompositionStringW(
/***********************************************************************
* ImmGetCompositionWindow (IMM32.@)
*/
BOOL WINAPI ImmGetCompositionWindow(HIMC hIMC, LPCOMPOSITIONFORM lpCompForm)
BOOL WINAPI ImmGetCompositionWindow( HIMC himc, COMPOSITIONFORM *composition )
{
struct imc *data = get_imc_data( hIMC );
INPUTCONTEXT *ctx;
BOOL ret;
TRACE("(%p, %p)\n", hIMC, lpCompForm);
TRACE( "himc %p, composition %p\n", himc, composition );
if (!data)
return FALSE;
if (!(ctx = ImmLockIMC( himc ))) return FALSE;
if ((ret = !!(ctx->fdwInit & INIT_COMPFORM))) *composition = ctx->cfCompForm;
ImmUnlockIMC( himc );
*lpCompForm = data->IMC.cfCompForm;
return TRUE;
return ret;
}
/***********************************************************************
......
......@@ -6122,8 +6122,8 @@ static void test_ImmSetCompositionWindow(void)
ctx->cfCompForm = expect_form;
ctx->fdwInit = ~INIT_COMPFORM;
memset( &comp_form, 0xcd, sizeof(comp_form) );
todo_wine ok_ret( 0, ImmGetCompositionWindow( himc, &comp_form ) );
todo_wine ok_eq( 0xcdcdcdcd, comp_form.dwStyle, UINT, "%#x" );
ok_ret( 0, ImmGetCompositionWindow( himc, &comp_form ) );
ok_eq( 0xcdcdcdcd, comp_form.dwStyle, UINT, "%#x" );
ctx->fdwInit = INIT_COMPFORM;
ok_ret( 1, ImmGetCompositionWindow( himc, &comp_form ) );
check_composition_form( &comp_form, &expect_form );
......
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