Skip to content

Commit

Permalink
Prevent ConPTY from de-snapping the terminal (#13164)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
zadjii-msft authored and DHowett committed May 25, 2022
1 parent 287db8a commit 997b4ac
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion src/interactivity/base/InteractivityFactory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -478,7 +478,18 @@ void InteractivityFactory::SetPseudoWindowCallback(std::function<void(bool)> fun
// - <none>
void InteractivityFactory::_WritePseudoWindowCallback(bool showOrHide)
{
if (_pseudoWindowMessageCallback)
// BODGY
//
// GH#13158 - At least temporarily, only allow the PTY to HIDE the terminal
// window. There seem to be many issues with this so far, and the quickest
// route to mitigate them seems to be limiting the interaction here to
// allowing ConPTY to minimize the terminal only. This will still allow
// applications to hide the Terminal via GetConsoleWindow(), but should
// broadly prevent any other impact of this feature.
//
// Should we need to restore this functionality in the future, we should
// only do so with great caution.
if (_pseudoWindowMessageCallback && showOrHide == false)
{
_pseudoWindowMessageCallback(showOrHide);
}
Expand Down

0 comments on commit 997b4ac

Please sign in to comment.