Repository navigation
Restore the ability for alt+tab to restore the Terminal after minimizing with taskbar - #13624
Merged
1 commit merged intoAug 1, 2022
Merged
1 commit merged into
1 commit merged into
Conversation
…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
Dustin L. Howett (DHowett)
added a commit
that referenced
this pull request
Jul 29, 2022
…nal after minimizing with taskbar
Leonard Hecker (lhecker)
approved these changes
Jul 30, 2022
This comment was marked as off-topic.
This comment was marked as off-topic.
ghost
requested review from
Dustin L. Howett (DHowett),
PankajBhojwani and
Carlos Zamora (carlos-zamora)
August 1, 2022 11:16
Carlos Zamora (carlos-zamora)
approved these changes
Aug 1, 2022
| // | ||
| // ONLY "restore" if already minimized. If the window is maximized or | ||
| // snapped, a restore will restore-down the window instead. | ||
| if (showOrHide == true && ::IsIconic(hwnd)) |
There was a problem hiding this comment.
Ah ok. So the only difference here is the IsIconic() check. Got it.
|
Don't forget to tag this up as servicing. Idk which versions this needs to be cherry-picked to? |
|
Hello Mike Griese (@zadjii-msft)! Because this pull request has the 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 (
|
ghost
deleted the
dev/migrie/13589-windowing-bodge
branch
August 1, 2022 20:34
Dustin L. Howett (DHowett)
pushed a commit
that referenced
this pull request
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
|
🎉 Handy links: |
This was referenced Aug 17, 2022
|
🎉 Handy links: |
Pēteris Kļaviņš (PKRoma)
pushed a commit
to PKRoma/Terminal
that referenced
this pull request
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
This pull request was closed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
SwitchToWindowon the invisible, owned ConPTY window instead of the main window. When that happens, ConPTY'll get aWM_SIZE(SIZE_RESTORED, lParam=0). The main window will NOT get aSwitchToWindowcalled. If ConPTY doesn't actually inform the hosting process about this, then the main HWND might stay hidden.[Native]::ShowWindow([Native]::GetConsoleWindow(), 6)still works