these are reasonable nits

This commit is contained in:
Mike Griese
2022-04-27 06:56:06 -05:00
parent 46b88e189b
commit 3b9710a4a4
3 changed files with 5 additions and 15 deletions

View File

@@ -1,3 +1,4 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT license.
@@ -2430,10 +2431,7 @@ namespace winrt::TerminalApp::implementation
TermControl term{ settings.DefaultSettings(), settings.UnfocusedSettings(), connection };
// GH#12515: ConPTY assumes it's hidden at the start. If we're not, let it know now.
if (_visible)
{
term.WindowVisibilityChanged(_visible);
}
term.WindowVisibilityChanged(_visible);
if (_hostingHwnd.has_value())
{

View File

@@ -312,10 +312,7 @@ namespace winrt::Microsoft::Terminal::TerminalConnection::implementation
THROW_IF_FAILED(_CreatePseudoConsoleAndPipes(dimensions, flags, &_inPipe, &_outPipe, &_hPC));
// GH#12515: The conpty assumes it's hidden at the start. If we're visible, let it know now.
if (_initialVisibility)
{
THROW_IF_FAILED(ConptyShowHidePseudoConsole(_hPC.get(), _initialVisibility));
}
THROW_IF_FAILED(ConptyShowHidePseudoConsole(_hPC.get(), _initialVisibility));
if (_initialParentHwnd != 0)
{
THROW_IF_FAILED(ConptyReparentPseudoConsole(_hPC.get(), reinterpret_cast<HWND>(_initialParentHwnd)));

View File

@@ -487,13 +487,8 @@ extern "C" HRESULT WINAPI ConptyClearPseudoConsole(_In_ HPCON hPC)
// - For more information, refer to GH#12515.
extern "C" HRESULT WINAPI ConptyShowHidePseudoConsole(_In_ HPCON hPC, bool show)
{
const PseudoConsole* const pPty = (PseudoConsole*)hPC;
HRESULT hr = pPty == nullptr ? E_INVALIDARG : S_OK;
if (SUCCEEDED(hr))
{
hr = _ShowHidePseudoConsole(pPty, show);
}
return hr;
// _ShowHidePseudoConsole will return E_INVALIDARG for us if the hPC is nullptr.
return _ShowHidePseudoConsole((PseudoConsole*)hPC, show);
}
// - Sends a message to the pseudoconsole informing it that it should use the