Commit Graph

90 Commits

Author SHA1 Message Date
Jacek Caban 12cc863a4a conhost: Set console window title.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-12 18:45:03 +02:00
Jacek Caban b2487c17eb conhost: Store title as zero terminated string.
To make it usable for Windows functions.

Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-12 18:45:01 +02:00
Jacek Caban 1333aebe0b conhost: Import scrolling support from wineconsole.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-12 18:44:59 +02:00
Jacek Caban a3583f0505 conhost: Support window resizing.
Based on wineconsole.

Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-12 18:44:56 +02:00
Jacek Caban 83b52b19b5 conhost: Import menu handling from wineconsole.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-09 17:38:38 +02:00
Jacek Caban 627ae12d2d conhost: Import config dialog from wineconsole.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-09 17:38:33 +02:00
Jacek Caban 91be31b28a conhost: Import mouse event handling from wineconsole.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-09 17:37:47 +02:00
Jacek Caban 7148521305 conhost: Import keyboard event handling from wineconsole.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-09 17:37:43 +02:00
Jacek Caban 6323e36f0f conhost: Import menus from wineconsole.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-09 17:37:37 +02:00
Jacek Caban d2aa17dcee conhost: Rename version.rc to conhost.rc.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-09 17:32:58 +02:00
Jacek Caban 3a6da8defa conhost: Support painting screen buffer.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-08 21:46:44 +02:00
Jacek Caban c2ffbe5d36 conhost: Update window config in ioctl handlers when needed.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-08 21:46:44 +02:00
Jacek Caban 632676d071 conhost: Import window state update from wineconsole.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-08 21:46:44 +02:00
Jacek Caban 7d48e0c564 conhost: Import font selection support from wineconsole.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-08 21:46:44 +02:00
Jacek Caban 5c45ec90ff conhost: Import loading console config from wineconsole.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-08 21:46:44 +02:00
Jacek Caban 3d51714ce4 conhost: Pump window messages when we have a window.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-08 21:46:44 +02:00
Jacek Caban bbd4196814 conhost: Initial support for creating console window.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-08 21:46:44 +02:00
Jacek Caban 0c25f5ee46 conhost: Use better default values in create_screen_buffer.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-07 10:15:39 +02:00
Jacek Caban 1d2c29dfb0 conhost: Don't create tty input thread if we don't have tty_input handle.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-07 10:15:31 +02:00
Jacek Caban a90017845d conhost: Scroll window to cursor position when needed.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-07 10:15:27 +02:00
Michael Stefaniuc 8bfdc84a19 conhost: Correct whitespace placement in a TRACE().
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-06 11:54:52 +02:00
Jacek Caban c9e1b789d2 conhost: Clear out_size in IOCTL_CONDRV_READ_CONSOLE implementation.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-01 21:48:20 +02:00
Jacek Caban 45b8489ba5 conhost: Call ensure_tty_input_thread in IOCTL_CONDRV_PEEK implementation.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-01 21:48:20 +02:00
Jacek Caban 5f24f30124 conhost: Terminate pseudo console on input error.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-24 17:45:38 +02:00
Jacek Caban c440926547 conhost/tests: Don't use inheritable handle for console pipe end.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-24 17:45:33 +02:00
Jacek Caban f3b8ccb2f7 conhost: Improve bound checking in fill_output.
Inspired by Pengpeng Dong's patch.

Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-24 17:45:24 +02:00
Pengpeng Dong b9f1ec8c44 conhost: Validate width param in write_output.
Signed-off-by: Pengpeng Dong <dongpengpeng@uniontech.com>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-23 15:45:31 +02:00
Haidong Yu d22e821964 conhost: Input should be restored and input_thread handle should be closed before return.
Signed-off-by: Haidong Yu <yuhaidong@uniontech.com>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-23 15:45:13 +02:00
Jacek Caban 810873eb75 kernel32: Move Beep implementation to conhost.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-22 21:35:35 +02:00
Jacek Caban c840de2839 conhost: Fix a leak in create_screen_buffer.
Based on patch by Haidong Yu.

Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-22 21:35:35 +02:00
Haidong Yu 4eb3ab95c7 conhost: Add missing LeaveCriticalSection.
Signed-off-by: Haidong Yu <yuhaidong@uniontech.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-21 21:42:13 +02:00
Jacek Caban c47f64bd3e conhost: Use IOCTL_CONDRV_SETUP_INPUT to initialize input in Unix mode.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-21 19:24:19 +02:00
Jacek Caban 158471d676 conhost: Delay creating input thread in Unix mode.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-21 19:24:19 +02:00
Jacek Caban fc408f3d43 conhost: Force using relative cursor positioning in update_read_output.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-21 19:24:19 +02:00
Jacek Caban aecf53d0f7 conhost: Use CP_UNIXCP in Unix mode.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-21 19:24:19 +02:00
Jacek Caban ef5af87f6c conhost: Introduce Unix mode.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-21 19:24:19 +02:00
Jacek Caban c6909e5254 conhost: Terminate current read request when input when reading tty input fails.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-21 19:24:19 +02:00
Jacek Caban a33594a048 conhost: Signal console in tty_input if needed.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-21 19:24:19 +02:00
Jacek Caban da3bd4cb4a conhost: Explicitly set tty cursor position after updating output in write_console.
This avoids absolute cursor position jumps.

Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-21 19:24:19 +02:00
Francois Gouget c21a7500ae conhost/tests: Fix the spelling of a comment message.
Signed-off-by: Francois Gouget <fgouget@free.fr>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-21 19:24:19 +02:00
Jacek Caban 67324a4284 conhost: Free screen buffer data in destroy_screen_buffer.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-15 21:43:45 +02:00
Jacek Caban cc6c5f7823 conhost/tests: Add ReadConsole tests.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-15 21:43:45 +02:00
Jacek Caban d36a179225 conhost/tests: Allow clear screen on console exit.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-15 21:43:45 +02:00
Jacek Caban 6f5872cbc5 conhost/tests: Improve handling slow conhost replies.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-15 21:43:45 +02:00
Jacek Caban 0cdb070b76 conhost: Add support for ENABLE_LINE_INPUT.
Imported from kernel32/readline.c.

Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-14 21:38:31 +02:00
Jacek Caban 73f55e2341 conhost: Add support for ENABLE_ECHO_INPUT.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-14 21:38:29 +02:00
Jacek Caban 01d203eebf conhost: Introduce IOCTL_CONDRV_READ_CONSOLE ioctl.
Partially based on kernel32.

Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-14 21:38:26 +02:00
Jacek Caban a26bb7b2ef conhost/tests: Wait for child process in test_pseudoconsole.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-11 16:55:40 +02:00
Jacek Caban 5d96c5aac8 conhost/tests: Add WriteConsole tests.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-11 16:55:40 +02:00
Jacek Caban 5ced4a705a conhost: Introduce IOCTL_CONDRV_WRITE_CONSOLE ioctl.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-11 16:55:40 +02:00