conhost: Signal console in tty_input if needed.
Signed-off-by: Jacek Caban <jacek@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
da3bd4cb4a
commit
a33594a048
|
@ -473,7 +473,7 @@ static NTSTATUS read_complete( struct console *console, NTSTATUS status, const v
|
||||||
status = wine_server_call( req );
|
status = wine_server_call( req );
|
||||||
}
|
}
|
||||||
SERVER_END_REQ;
|
SERVER_END_REQ;
|
||||||
if (status) ERR( "failed: %#x\n", status );
|
if (status && (console->read_ioctl || status != STATUS_INVALID_HANDLE)) ERR( "failed: %#x\n", status );
|
||||||
console->read_ioctl = 0;
|
console->read_ioctl = 0;
|
||||||
console->pending_read = 0;
|
console->pending_read = 0;
|
||||||
return status;
|
return status;
|
||||||
|
@ -1580,6 +1580,7 @@ static DWORD WINAPI tty_input( void *param )
|
||||||
char read_buf[4096];
|
char read_buf[4096];
|
||||||
WCHAR buf[4096];
|
WCHAR buf[4096];
|
||||||
DWORD count, i;
|
DWORD count, i;
|
||||||
|
BOOL signaled;
|
||||||
NTSTATUS status;
|
NTSTATUS status;
|
||||||
|
|
||||||
event = CreateEventW( NULL, TRUE, FALSE, NULL );
|
event = CreateEventW( NULL, TRUE, FALSE, NULL );
|
||||||
|
@ -1595,6 +1596,7 @@ static DWORD WINAPI tty_input( void *param )
|
||||||
if (status) break;
|
if (status) break;
|
||||||
|
|
||||||
EnterCriticalSection( &console_section );
|
EnterCriticalSection( &console_section );
|
||||||
|
signaled = console->record_count != 0;
|
||||||
|
|
||||||
/* FIXME: Handle partial char read */
|
/* FIXME: Handle partial char read */
|
||||||
count = MultiByteToWideChar(CP_UTF8, 0, read_buf, io.Information, buf, ARRAY_SIZE(buf));
|
count = MultiByteToWideChar(CP_UTF8, 0, read_buf, io.Information, buf, ARRAY_SIZE(buf));
|
||||||
|
@ -1626,6 +1628,11 @@ static DWORD WINAPI tty_input( void *param )
|
||||||
}
|
}
|
||||||
|
|
||||||
process_console_input( console );
|
process_console_input( console );
|
||||||
|
if (!signaled && console->record_count)
|
||||||
|
{
|
||||||
|
assert( !console->read_ioctl );
|
||||||
|
read_complete( console, STATUS_SUCCESS, NULL, 0, TRUE ); /* signal console */
|
||||||
|
}
|
||||||
LeaveCriticalSection( &console_section );
|
LeaveCriticalSection( &console_section );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue