[PATCH 2/2] conhost: Improve notification when resizing window.
Jacek Caban
jacek at codeweavers.com
Wed Feb 3 07:20:57 CST 2021
On 02.02.2021 08:44, Roman Pišl wrote:
>
>
> Dne 01. 02. 21 v 18:43 Jacek Caban napsal(a):
>> On 01.02.2021 18:29, Roman Pišl wrote:
>>> diff --git a/programs/conhost/window.c b/programs/conhost/window.c
>>> index 5e94a1d454e..01917ee8b67 100644
>>> --- a/programs/conhost/window.c
>>> +++ b/programs/conhost/window.c
>>> @@ -1901,6 +1901,8 @@ static void apply_config( struct console
>>> *console, const struct console_config *
>>> }
>>> update_window( console );
>>> +
>>> + notify_screen_buffer_size( console->active );
>>
>>
>> Should we do this only when the size actually changed?
>
> Good point. But the application usually updates also viewport within
> this event. And since there is no event for viewport change, not
> sending this event if there is only viewport change without buffer
> change is a half solution.
>
> I also found this: https://github.com/microsoft/terminal/issues/281
>
> Yes, there could be a test for viewport and buffer change, but isn't
> such complexity superfluous considering that apply_config is only
> called on init, config dialog and resize event?
Agreed, that seems fine. I was also a bit worried that we'd call
notify_screen_buffer_size() also during console initialization, but it's
a no-op until ENABLE_WINDOW_INPUT is set (and it's not among default
flags), so this looks fine.
Thanks,
Jacek
More information about the wine-devel
mailing list