1
0
mirror of https://github.com/wine-mirror/wine synced 2024-06-26 13:02:25 +00:00

conhost: Support IME input in window mode.

Signed-off-by: Eric Pouech <epouech@codeweavers.com>
This commit is contained in:
Eric Pouech 2024-05-23 12:42:40 +02:00 committed by Alexandre Julliard
parent b85c6f5bbb
commit 80342a0c10

View File

@ -2841,6 +2841,12 @@ static NTSTATUS process_console_ioctls( struct console *console )
}
}
static BOOL is_key_message( const MSG *msg )
{
return msg->message == WM_KEYDOWN || msg->message == WM_SYSKEYDOWN ||
msg->message == WM_KEYUP || msg->message == WM_SYSKEYUP;
}
static int main_loop( struct console *console, HANDLE signal )
{
HANDLE signal_event = NULL;
@ -2875,10 +2881,15 @@ static int main_loop( struct console *console, HANDLE signal )
if (res == WAIT_OBJECT_0 + wait_cnt)
{
MSG msg;
while (PeekMessageW( &msg, 0, 0, 0, PM_REMOVE ))
{
BOOL translated = FALSE;
if (msg.message == WM_QUIT) return 0;
DispatchMessageW(&msg);
if (is_key_message( &msg ) && msg.wParam == VK_PROCESSKEY)
translated = TranslateMessage( &msg );
if (!translated || msg.hwnd != console->win)
DispatchMessageW( &msg );
}
continue;
}