Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ConPTY sends two WINDOW_BUFFER_SIZE_EVENT messages when the window is restored from maximize #1765

Open
zadjii-msft opened this issue Jul 1, 2019 · 1 comment
Labels
Area-Server Down in the muck of API call servicing, interprocess communication, eventing, etc. Issue-Bug It either shouldn't be doing this or needs an investigation. Priority-3 A description (P3) Product-Conpty For console issues specifically related to conpty
Milestone

Comments

@zadjii-msft
Copy link
Member

I think I found one resize bug. A ConPTY sends two WINDOW_BUFFER_SIZE_EVENT messages when the window is restored from maximize, but the first one has the wrong size (not sure of the internals of this, but it appears in conhost/tmux/pwsh, alacritty/pwsh, and Windows Terminal).

Run this program as conevents -es in conhost and a different terminal to see the difference; maximize and restore the window. For example, restoring the WinTerm window reports 119 x 46 in the WINDOW_BUFFER_SIZE_EVENT message, but GetConsoleScreenBufferInfo returns the correct value 119 x 32.

Originally posted by @parkovski in #1465 (comment)

@ghost ghost added Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting Needs-Tag-Fix Doesn't match tag requirements labels Jul 1, 2019
@DHowett-MSFT DHowett-MSFT added Area-Server Down in the muck of API call servicing, interprocess communication, eventing, etc. Issue-Bug It either shouldn't be doing this or needs an investigation. Product-Conpty For console issues specifically related to conpty and removed Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting labels Jul 1, 2019
@ghost ghost removed the Needs-Tag-Fix Doesn't match tag requirements label Jul 1, 2019
@DHowett-MSFT DHowett-MSFT added this to the Terminal v1.0 milestone Jul 1, 2019
@zadjii-msft
Copy link
Member Author

Holy crap, I saw the cause of this in #1795 (comment).

We perform a resize on the conpty buffer twice, once to resize the width, and again to resize the height. By resizing twice, we hit the code path that emits a WINDOW_BUFFER_SIZE_EVENT twice. This is obviously insane, so there's gotta be a better way.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Server Down in the muck of API call servicing, interprocess communication, eventing, etc. Issue-Bug It either shouldn't be doing this or needs an investigation. Priority-3 A description (P3) Product-Conpty For console issues specifically related to conpty
Projects
None yet
Development

No branches or pull requests

4 participants