imm32: Fixed ImmUnlockIMC.

This commit is contained in:
Qian Hong 2013-08-01 14:32:35 +08:00 committed by Alexandre Julliard
parent 0f14a77f5d
commit 44f6006738
2 changed files with 5 additions and 4 deletions

View File

@ -2606,8 +2606,9 @@ LPINPUTCONTEXT WINAPI ImmLockIMC(HIMC hIMC)
BOOL WINAPI ImmUnlockIMC(HIMC hIMC)
{
InputContextData *data = hIMC;
data->dwLock--;
return (data->dwLock!=0);
if (data->dwLock)
data->dwLock--;
return TRUE;
}
/***********************************************************************

View File

@ -702,13 +702,13 @@ static void test_ImmGetIMCLockCount(void)
count = ImmGetIMCLockCount(imc);
ok(count == 1, "expect 1, returned %d\n", count);
ret = ImmUnlockIMC(imc);
todo_wine ok(ret == TRUE, "expect TRUE, ret %d\n", ret);
ok(ret == TRUE, "expect TRUE, ret %d\n", ret);
count = ImmGetIMCLockCount(imc);
ok(count == 0, "expect 0, returned %d\n", count);
ret = ImmUnlockIMC(imc);
ok(ret == TRUE, "expect TRUE, ret %d\n", ret);
count = ImmGetIMCLockCount(imc);
todo_wine ok(count == 0, "expect 0, returned %d\n", count);
ok(count == 0, "expect 0, returned %d\n", count);
ImmDestroyContext(imc);
}