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

[DefApp] Teach connection and tab to negotiate initial size #10772

Merged
1 commit merged into from
Jul 26, 2021

Conversation

miniksa
Copy link
Member

@miniksa miniksa commented Jul 23, 2021

  • For tabs started from the Terminal, the initial sizing information is
    passed into the connection and used to establish the PTY. Those
    parameters are given over to the OpenConsole.exe acting as PTY to
    establish the initial buffer/window size.
  • However, for tabs started from outside, the PTY is created with some
    default buffer information FIRST as the Terminal hasn't even been
    involved yet. As such, when the Terminal gets that connection, it must
    tell the PTY to resize just as it connects to match the window size
    it's about to use.
  • Ongoing resize operations in the Terminal did and still work fine
    because they transmitted the updated size with the
    ResizePseudoConsole API.

Validation Steps Performed

  • Confirmed existing tabs opening have correct initial size in PTY
    (like with CMD mode con command)
  • Confirmed inbound cmd tabs have correct initial size in PTY via
    mode con command per bug repro

Closes #9811

@ghost ghost added Area-DefApp Issue-Bug It either shouldn't be doing this or needs an investigation. Priority-1 A description (P1) Product-Terminal The new Windows Terminal. labels Jul 23, 2021
if (!_hPC)
// If we haven't started connecting at all, it's still fair to update
// the initial rows and columns before we set things up.
if (!_isStateAtOrBeyond(ConnectionState::Connecting))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yay you used my fun template garbage

@DHowett DHowett added zPreview-Service-Queued-1.13 A floating label that tracks the current Preview version for servicing purposes. AutoMerge Marked for automatic merge by the bot when requirements are met labels Jul 26, 2021
@ghost
Copy link

ghost commented Jul 26, 2021

Hello @DHowett!

Because this pull request has the AutoMerge label, I will be glad to assist with helping to merge this pull request once all check-in policies pass.

p.s. you can customize the way I help with merging this pull request, such as holding this pull request until a specific person approves. Simply @mention me (@msftbot) and give me an instruction to get started! Learn more here.

@ghost ghost merged commit 862217b into main Jul 26, 2021
@ghost ghost deleted the dev/miniksa/def_initial_size branch July 26, 2021 19:31
DHowett pushed a commit that referenced this pull request Aug 25, 2021
- For tabs started from the Terminal, the initial sizing information is
  passed into the connection and used to establish the PTY. Those
  parameters are given over to the `OpenConsole.exe` acting as PTY to
  establish the initial buffer/window size.
- However, for tabs started from outside, the PTY is created with some
  default buffer information FIRST as the Terminal hasn't even been
  involved yet. As such, when the Terminal gets that connection, it must
  tell the PTY to resize just as it connects to match the window size
  it's about to use.
- Ongoing resize operations in the Terminal did and still work fine
  because they transmitted the updated size with the
  `ResizePseudoConsole` API.

## Validation Steps Performed
- [x] Confirmed existing tabs opening have correct initial size in PTY
  (like with CMD `mode con` command)
- [x] Confirmed inbound cmd tabs have correct initial size in PTY via
  `mode con` command per bug repro

Closes #9811
@DHowett DHowett removed the zPreview-Service-Queued-1.13 A floating label that tracks the current Preview version for servicing purposes. label Aug 25, 2021
@ghost
Copy link

ghost commented Aug 31, 2021

🎉Windows Terminal Preview v1.10.2383.0 has been released which incorporates this pull request.:tada:

Handy links:

@ghost
Copy link

ghost commented Aug 31, 2021

🎉Windows Terminal Preview v1.11.2421.0 has been released which incorporates this pull request.:tada:

Handy links:

This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-DefApp AutoMerge Marked for automatic merge by the bot when requirements are met Issue-Bug It either shouldn't be doing this or needs an investigation. Priority-1 A description (P1) Product-Terminal The new Windows Terminal.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[DefApp] TerminalHandoff does not communicate first new size to client
4 participants