Handle window resize event (CSI t, resize) (#17721)

`ResizeWindow` event in `TerminalApi` is handled and bubbled to
`TerminalApi->ControlCore->TermControl->TerminalPage->AppHost`. Resizing
is accepted only if the window is not in fullscreen or quake mode, and
has 1 tab and pane.

Relevant issues: #5094
This commit is contained in:
Nihat Uygar Köseer
2024-08-29 21:43:50 +03:00
committed by GitHub
parent 93d592bb41
commit 837215b206
24 changed files with 248 additions and 4 deletions

View File

@@ -534,6 +534,14 @@ namespace winrt::Microsoft::Terminal::TerminalConnection::implementation
}
}
void ConptyConnection::ResetSize()
{
if (_isConnected())
{
THROW_IF_FAILED(ConptyResizePseudoConsole(_hPC.get(), { Utils::ClampToShortMax(_cols, 1), Utils::ClampToShortMax(_rows, 1) }));
}
}
void ConptyConnection::ClearBuffer()
{
// If we haven't connected yet, then we really don't need to do