diff --git a/src/cascadia/TerminalControl/TermControl.h b/src/cascadia/TerminalControl/TermControl.h index 5a229fb066b7..0fedb4162ff1 100644 --- a/src/cascadia/TerminalControl/TermControl.h +++ b/src/cascadia/TerminalControl/TermControl.h @@ -156,7 +156,7 @@ namespace winrt::Microsoft::Terminal::TerminalControl::implementation void _ApplyUISettings(); void _InitializeBackgroundBrush(); void _BackgroundColorChanged(const uint32_t color); - void _InitializeTerminal(); + bool _InitializeTerminal(); void _UpdateFont(const bool initialUpdate = false); void _KeyDownHandler(Windows::Foundation::IInspectable const& sender, Windows::UI::Xaml::Input::KeyRoutedEventArgs const& e); void _CharacterHandler(Windows::Foundation::IInspectable const& sender, Windows::UI::Xaml::Input::CharacterReceivedRoutedEventArgs const& e); diff --git a/src/cascadia/WindowsTerminal/AppHost.cpp b/src/cascadia/WindowsTerminal/AppHost.cpp index 7710575c764a..5e1b819f0347 100644 --- a/src/cascadia/WindowsTerminal/AppHost.cpp +++ b/src/cascadia/WindowsTerminal/AppHost.cpp @@ -205,9 +205,9 @@ void AppHost::_HandleCreateWindow(const HWND hwnd, RECT proposedRect, winrt::Ter // Get the size of a window we'd need to host that client rect. This will // add the titlebar space. - const auto client2win = _window->GetClientToWinSizeDelta(dpix); - adjustedHeight = clientRect.bottom - clientRect.top + client2win.cx; - adjustedWidth = clientRect.right - clientRect.left + client2win.cy; + const auto nonClientSize = _window->GetNonClientSize(dpix); + adjustedHeight = clientRect.bottom - clientRect.top + nonClientSize.cx; + adjustedWidth = clientRect.right - clientRect.left + nonClientSize.cy; } const COORD origin{ gsl::narrow(proposedRect.left), diff --git a/src/cascadia/WindowsTerminal/IslandWindow.h b/src/cascadia/WindowsTerminal/IslandWindow.h index 7c865b1f095d..61a9085cf121 100644 --- a/src/cascadia/WindowsTerminal/IslandWindow.h +++ b/src/cascadia/WindowsTerminal/IslandWindow.h @@ -33,7 +33,7 @@ class IslandWindow : virtual void Initialize(); - void SetCreateCallback(std::function pfn) noexcept; + void SetCreateCallback(std::function pfn) noexcept; void SetSnapDimensionCallback(std::function pfn) noexcept; void UpdateTheme(const winrt::Windows::UI::Xaml::ElementTheme& requestedTheme);