mirror of
https://github.com/microsoft/terminal.git
synced 2026-04-06 06:09:50 +00:00
Compare commits
5 Commits
feature/ll
...
v1.17.1023
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
80c529aced | ||
|
|
ab79a85381 | ||
|
|
b9089d9d1d | ||
|
|
272e7b0905 | ||
|
|
7326eaaa6f |
@@ -1990,6 +1990,11 @@ namespace winrt::Microsoft::Terminal::Control::implementation
|
||||
if (!_IsClosing())
|
||||
{
|
||||
_closing = true;
|
||||
if (_automationPeer)
|
||||
{
|
||||
auto autoPeerImpl{ winrt::get_self<implementation::TermControlAutomationPeer>(_automationPeer) };
|
||||
autoPeerImpl->Close();
|
||||
}
|
||||
|
||||
_RestorePointerCursorHandlers(*this, nullptr);
|
||||
|
||||
|
||||
@@ -117,6 +117,13 @@ namespace winrt::Microsoft::Terminal::Control::implementation
|
||||
}
|
||||
}
|
||||
|
||||
void TermControlAutomationPeer::Close()
|
||||
{
|
||||
// GH#13978: If the TermControl has already been removed from the UI tree, XAML might run into weird bugs.
|
||||
// This will prevent the `dispatcher.RunAsync` calls below from raising UIA events on the main thread.
|
||||
_termControl = {};
|
||||
}
|
||||
|
||||
// Method Description:
|
||||
// - Signals the ui automation client that the terminal's selection has changed and should be updated
|
||||
// Arguments:
|
||||
|
||||
@@ -49,6 +49,7 @@ namespace winrt::Microsoft::Terminal::Control::implementation
|
||||
void UpdateControlBounds();
|
||||
void SetControlPadding(const Core::Padding padding);
|
||||
void RecordKeyEvent(const WORD vkey);
|
||||
void Close();
|
||||
|
||||
#pragma region FrameworkElementAutomationPeer
|
||||
hstring GetClassNameCore() const;
|
||||
|
||||
@@ -42,16 +42,6 @@ namespace winrt::Microsoft::Terminal::Settings::Editor::implementation
|
||||
// Only let this succeed once.
|
||||
_layoutUpdatedRevoker.revoke();
|
||||
|
||||
for (const auto scheme : _ViewModel.AllColorSchemes())
|
||||
{
|
||||
if (scheme.IsDefaultScheme())
|
||||
{
|
||||
winrt::hstring newName{ fmt::format(L"{} ({})", scheme.Name(), RS_(L"ColorScheme_DefaultTag/Text")) };
|
||||
Automation::AutomationProperties::SetName(ColorSchemeListView().ContainerFromItem(scheme), newName);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
ColorSchemeListView().Focus(FocusState::Programmatic);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
#include "NotificationIcon.h"
|
||||
#include <dwmapi.h>
|
||||
#include <TerminalThemeHelpers.h>
|
||||
#include <CoreWindow.h>
|
||||
|
||||
extern "C" IMAGE_DOS_HEADER __ImageBase;
|
||||
|
||||
@@ -499,6 +500,24 @@ long IslandWindow::_calculateTotalSize(const bool isWidth, const long clientSize
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
// BODGY This is a fix for the upstream:
|
||||
//
|
||||
// https://github.com/microsoft/microsoft-ui-xaml/issues/3577
|
||||
//
|
||||
// ContentDialogs don't resize themselves when the XAML island resizes.
|
||||
// However, if we manually resize our CoreWindow, that'll actually
|
||||
// trigger a resize of the ContentDialog.
|
||||
if (const auto& coreWindow{ winrt::Windows::UI::Core::CoreWindow::GetForCurrentThread() })
|
||||
{
|
||||
if (const auto& interop{ coreWindow.as<ICoreWindowInterop>() })
|
||||
{
|
||||
HWND coreWindowInterop;
|
||||
interop->get_WindowHandle(&coreWindowInterop);
|
||||
PostMessage(coreWindowInterop, message, wparam, lparam);
|
||||
}
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
case WM_MOVING:
|
||||
|
||||
@@ -175,6 +175,7 @@ try
|
||||
{
|
||||
_newOutput.append(newText);
|
||||
_newOutput.push_back(L'\n');
|
||||
_textBufferChanged = true;
|
||||
}
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user