suppressApplicationTitle suppresses initial application title (#3837)

Fixed bug where suppressApplicationTitle didn't suppress initial title from application
Also fixes the Azure Cloud Shell issue.
This commit is contained in:
Kayla Cinnamon 2019-12-04 14:57:44 -08:00 committed by Carlos Zamora
parent 5c43f055c5
commit 54966c374f
2 changed files with 7 additions and 18 deletions

View File

@ -87,6 +87,11 @@ void Terminal::CreateFromSettings(winrt::Microsoft::Terminal::Settings::ICoreSet
{
const COORD viewportSize{ Utils::ClampToShortMax(settings.InitialCols(), 1),
Utils::ClampToShortMax(settings.InitialRows(), 1) };
if (_suppressApplicationTitle)
{
_title = _startingTitle;
}
// TODO:MSFT:20642297 - Support infinite scrollback here, if HistorySize is -1
Create(viewportSize, Utils::ClampToShortMax(settings.HistorySize(), 0), renderTarget);

View File

@ -365,25 +365,9 @@ bool Terminal::EraseInDisplay(const DispatchTypes::EraseType eraseType)
bool Terminal::SetWindowTitle(std::wstring_view title)
{
// Set the title on Terminal load
if (_title.empty())
{
_title = title;
_pfnTitleChanged(title);
}
_title = _suppressApplicationTitle ? _startingTitle : title;
_title = title;
// If this is removed, the tab object assumes the application title is the title
if (_suppressApplicationTitle)
{
_title = _startingTitle;
}
if (_pfnTitleChanged && !_suppressApplicationTitle)
{
_pfnTitleChanged(_title);
}
_pfnTitleChanged(_title);
return true;
}