[PATCH v2 2/6] dlls/kernelbase, programs/conhost: return key state in ReadConsoleW with control
Jacek Caban
jacek at codeweavers.com
Mon Feb 28 09:50:08 CST 2022
On 2/27/22 15:23, Eric Pouech wrote:
> Le 25/02/2022 à 20:19, Jacek Caban a écrit :
>> On 2/23/22 18:05, Eric Pouech wrote:
>>> diff --git a/programs/conhost/conhost.h b/programs/conhost/conhost.h
>>> index e5f70aa3ca4..35876689419 100644
>>> --- a/programs/conhost/conhost.h
>>> +++ b/programs/conhost/conhost.h
>>> @@ -88,6 +88,7 @@ struct console
>>> unsigned int read_ioctl; /* current read
>>> ioctl */
>>> size_t pending_read; /* size of pending
>>> read buffer */
>>> struct edit_line edit_line; /* edit line
>>> context */
>>> + unsigned int key_state;
>>> struct console_window *window;
>>> WCHAR *title; /* console title */
>>> struct history_line **history; /* lines history */
>>
>>
>> I think it would fit better in edit_line struct.
>
>
> as the edit struct is zeroed upon completion (and before returning the
> result), it would also require moving
>
> - write of the key state inside the edit buffer in
> process_console_input() (insert 2 new characters for the DWORD)
>
> - hence handle in process_console_input that the layout of the buffer
> differs depending on ioctl
>
> I thought it was more readable to keep the edit logic as is, and and
> on top of it returning or not the keystate flag
>
> but see no reason why it wouldn't be doable
Agreed, it's probably not worth the complication. That's fine with me.
Thanks,
Jacek
More information about the wine-devel
mailing list