[PATCH v2 2/6] dlls/kernelbase, programs/conhost: return key state in ReadConsoleW with control

Eric Pouech eric.pouech at orange.fr
Mon Feb 28 10:23:49 CST 2022


Le 28/02/2022 à 16:50, Jacek Caban a écrit :
> 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
>
ok I'll resend with the fix on the delta_y inversion (likely tomorrow 
depending on what Alexandre commits or not tonight)

A+
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.winehq.org/pipermail/wine-devel/attachments/20220228/6b4cdda7/attachment.htm>


More information about the wine-devel mailing list