imm32: Ignore some messages in ImmTranslateMessage.

This commit is contained in:
Rémi Bernon 2023-04-30 23:26:32 +02:00 committed by Alexandre Julliard
parent 4b621dd9ae
commit bfb7799b74
2 changed files with 3 additions and 2 deletions

View file

@ -3124,6 +3124,7 @@ BOOL WINAPI ImmTranslateMessage( HWND hwnd, UINT msg, WPARAM wparam, LPARAM lpar
TRACE( "hwnd %p, msg %#x, wparam %#Ix, lparam %#Ix\n", hwnd, msg, wparam, lparam );
if (msg < WM_KEYDOWN || msg > WM_KEYUP) return FALSE;
if (!(data = get_imc_data( ImmGetContext( hwnd ) ))) return FALSE;
if (!(ime = imc_select_ime( data ))) return FALSE;
if (data->lastVK == VK_PROCESSKEY) return FALSE;

View file

@ -7082,12 +7082,12 @@ static void test_ImmTranslateMessage( BOOL kbd_char_first )
ok_ret( 2, ImmProcessKey( hwnd, expect_ime, 'Q', MAKELONG(2, 0xc010), 0 ) );
ok_ret( 0, ImmTranslateMessage( hwnd, 0, 0, 0 ) );
todo_wine ok_ret( 'Q', ImmGetVirtualKey( hwnd ) );
ok_ret( 'Q', ImmGetVirtualKey( hwnd ) );
ok_seq( process_key_seq );
ok_ret( 0, ImmTranslateMessage( hwnd, WM_KEYDOWN, 'Q', MAKELONG(2, 0x10) ) );
ok_ret( VK_PROCESSKEY, ImmGetVirtualKey( hwnd ) );
todo_wine ok_seq( to_ascii_ex_0 );
ok_seq( to_ascii_ex_0 );
ok_ret( 0, ImmTranslateMessage( hwnd, WM_KEYUP, 'Q', MAKELONG(2, 0xc010) ) );
ok_seq( empty_sequence );