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

[1.14] Opening a tab makes the Terminal window resize #13158

Closed
ellgramar opened this issue May 24, 2022 · 3 comments · Fixed by #13164
Closed

[1.14] Opening a tab makes the Terminal window resize #13158

ellgramar opened this issue May 24, 2022 · 3 comments · Fixed by #13164
Labels
Area-Windowing Window frame, quake mode, tearout Issue-Bug It either shouldn't be doing this or needs an investigation. Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting Priority-0 Bugs that we consider release-blocking/recall-class (P0) Product-Terminal The new Windows Terminal. Resolution-Fix-Committed Fix is checked in, but it might be 3-4 weeks until a release. Severity-Blocking We won't ship a release like this! No-siree.

Comments

@ellgramar
Copy link

Windows Terminal version

1.14.1433.0

Windows build number

10.0.22000.0

Other Software

No response

Steps to reproduce

Open Terminal and snap the window to your choice of left, right, or top. One may also snap another app to the right or left (opposite the terminal). Then open a new tab.

Uploading ellgramar-WinTermPrev-SnapBehaviour.mp4…

Expected Behavior

When opening a new tab, The window was expected to stay snapped to where it was placed.

ellgramar-WinTerm-ExpectedSnapBehaviour.mp4

Actual Behavior

When a new tab was opened, the window de-snapped, resized to the default launch dimensions and returned to the last free floating location it had been.

@ellgramar ellgramar added the Issue-Bug It either shouldn't be doing this or needs an investigation. label May 24, 2022
@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 May 24, 2022
@zadjii-msft
Copy link
Member

Oh I know exactly what regressed this.

I bet this has to do with the Show/Hide work from #12515 / #12570. I'm betting that either showing the pty window, or showing the Terminal window in response to the PTY window opening is causing the terminal window to un-snap. Great.

@zadjii-msft zadjii-msft added Product-Terminal The new Windows Terminal. Priority-0 Bugs that we consider release-blocking/recall-class (P0) Area-Windowing Window frame, quake mode, tearout labels May 24, 2022
@ghost ghost removed the Needs-Tag-Fix Doesn't match tag requirements label May 24, 2022
@zadjii-msft zadjii-msft added this to the Terminal v1.15 milestone May 24, 2022
@zadjii-msft zadjii-msft added Severity-Blocking We won't ship a release like this! No-siree. Needs-Discussion Something that requires a team discussion before we can proceed labels May 24, 2022
@gurnec
Copy link

gurnec commented May 24, 2022

This can also be reproduced from a maximized Terminal window. Specifically:

  1. Set the Launch mode to Default.
  2. Start Windows Terminal, it opens in a non-maximized window.
  3. Maximize the window.
  4. Open a new tab, Windows Terminal "restores" / becomes non-maximized.

@ghost ghost added the In-PR This issue has a related PR label May 24, 2022
@zadjii-msft zadjii-msft changed the title While using a window snap, opening a new tab/profile resets window to default launch size. [1.14.1433*] Opening a tab can cause the Terminal window to change size May 24, 2022
@zadjii-msft zadjii-msft pinned this issue May 24, 2022
DHowett pushed a commit that referenced this issue May 25, 2022
This is a big hammer to put out this fire. We're keeping the hiding around for now, cause we think that's likely the one that the internal tests use that we really care about here. If we need to bring this back, we can. 

* [x] Closes #13158
* [x] Closes #13162
* [x] Validated these both manually 
* [x] `[Native]::ShowWindow([Native]::GetConsoleWindow(), 6)` still works
@ghost ghost added Resolution-Fix-Committed Fix is checked in, but it might be 3-4 weeks until a release. and removed In-PR This issue has a related PR labels May 25, 2022
DHowett pushed a commit that referenced this issue May 25, 2022
This is a big hammer to put out this fire. We're keeping the hiding around for now, cause we think that's likely the one that the internal tests use that we really care about here. If we need to bring this back, we can.

* [x] Closes #13158
* [x] Closes #13162
* [x] Validated these both manually
* [x] `[Native]::ShowWindow([Native]::GetConsoleWindow(), 6)` still works

(cherry picked from commit 11b810e)
Service-Card-Id: 82371517
Service-Version: 1.14
@DHowett DHowett changed the title [1.14.1433*] Opening a tab can cause the Terminal window to change size [1.14] Opening a tab makes the Terminal window resize May 25, 2022
@zadjii-msft zadjii-msft removed the Needs-Discussion Something that requires a team discussion before we can proceed label Jun 6, 2022
@ghost
Copy link

ghost commented Jun 10, 2022

🎉This issue was addressed in #13164, which has now been successfully released as Windows Terminal Preview v1.14.145.:tada:

Handy links:

@DHowett DHowett unpinned this issue Jul 6, 2022
zadjii-msft added a commit that referenced this issue Jul 28, 2022
…ing with taskbar

Curiously, at least on Windows 10 (and rarely on Windows 11), if you minimize the Terminal by clicking on the taskbar, then alt-tab to try and restore the window, the Taskbar will decide to call `SwitchToWindow` on the invisible, owned ConPTY window instead of the main window. When that happens, ConPTY'll get a `WM_SIZE(SIZE_RESTORED, lParam=0)`. The main window will NOT get a `SwitchToWindow` called. If ConPTY doesn't actually inform the hosting process about this, then the main HWND might stay hidden.

* Refer to #13158 where we disabled this.
* Closes #13589
* **TODO** Does this also address #13248
* Tested manually on a Windows 10 VM.
* Confirmed that opening tabs while maximized/snapped doesn't restore down.
* `[Native]::ShowWindow([Native]::GetConsoleWindow(), 6)` still works
ghost pushed a commit that referenced this issue Aug 1, 2022
…ing with taskbar (#13624)

Curiously, at least on Windows 10 (and rarely on Windows 11), if you minimize the Terminal by clicking on the taskbar, then alt-tab to try and restore the window, the Taskbar will decide to call `SwitchToWindow` on the invisible, owned ConPTY window instead of the main window. When that happens, ConPTY'll get a `WM_SIZE(SIZE_RESTORED, lParam=0)`. The main window will NOT get a `SwitchToWindow` called. If ConPTY doesn't actually inform the hosting process about this, then the main HWND might stay hidden.

* Refer to #13158 where we disabled this.
* Closes #13589
* Closes #13248
* Tested manually on a Windows 10 VM.
* Confirmed that opening tabs while maximized/snapped doesn't restore down.
* `[Native]::ShowWindow([Native]::GetConsoleWindow(), 6)` still works
DHowett pushed a commit that referenced this issue Aug 8, 2022
…ing with taskbar (#13624)

Curiously, at least on Windows 10 (and rarely on Windows 11), if you minimize the Terminal by clicking on the taskbar, then alt-tab to try and restore the window, the Taskbar will decide to call `SwitchToWindow` on the invisible, owned ConPTY window instead of the main window. When that happens, ConPTY'll get a `WM_SIZE(SIZE_RESTORED, lParam=0)`. The main window will NOT get a `SwitchToWindow` called. If ConPTY doesn't actually inform the hosting process about this, then the main HWND might stay hidden.

* Refer to #13158 where we disabled this.
* Closes #13589
* Closes #13248
* Tested manually on a Windows 10 VM.
* Confirmed that opening tabs while maximized/snapped doesn't restore down.
* `[Native]::ShowWindow([Native]::GetConsoleWindow(), 6)` still works

(cherry picked from commit d1fc112)
Service-Card-Id: 84673887
Service-Version: 1.15
PKRoma pushed a commit to PKRoma/Terminal that referenced this issue Oct 15, 2022
…ing with taskbar (microsoft#13624)

Curiously, at least on Windows 10 (and rarely on Windows 11), if you minimize the Terminal by clicking on the taskbar, then alt-tab to try and restore the window, the Taskbar will decide to call `SwitchToWindow` on the invisible, owned ConPTY window instead of the main window. When that happens, ConPTY'll get a `WM_SIZE(SIZE_RESTORED, lParam=0)`. The main window will NOT get a `SwitchToWindow` called. If ConPTY doesn't actually inform the hosting process about this, then the main HWND might stay hidden.

* Refer to microsoft#13158 where we disabled this.
* Closes microsoft#13589
* Closes microsoft#13248
* Tested manually on a Windows 10 VM.
* Confirmed that opening tabs while maximized/snapped doesn't restore down.
* `[Native]::ShowWindow([Native]::GetConsoleWindow(), 6)` still works

(cherry picked from commit d1fc112)
Service-Card-Id: 84673887
Service-Version: 1.15
(cherry picked from commit b670800)
Service-Card-Id: 84673886
Service-Version: 1.14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Windowing Window frame, quake mode, tearout Issue-Bug It either shouldn't be doing this or needs an investigation. Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting Priority-0 Bugs that we consider release-blocking/recall-class (P0) Product-Terminal The new Windows Terminal. Resolution-Fix-Committed Fix is checked in, but it might be 3-4 weeks until a release. Severity-Blocking We won't ship a release like this! No-siree.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants