diff --git a/src/buffer/out/UnicodeStorage.cpp b/src/buffer/out/UnicodeStorage.cpp index 41f85adcf..1f4c1831a 100644 --- a/src/buffer/out/UnicodeStorage.cpp +++ b/src/buffer/out/UnicodeStorage.cpp @@ -47,7 +47,7 @@ void UnicodeStorage::Erase(const key_type key) // - rowMap - A map of the old row IDs to the new row IDs. // - width - The width of the new row. Remove any items that are beyond the row width. // - Use nullopt if we're not resizing the width of the row, just renumbering the rows. -void UnicodeStorage::Remap(const std::map& rowMap, const std::optional width) +void UnicodeStorage::Remap(const std::unordered_map& rowMap, const std::optional width) { // Make a temporary map to hold all the new row positioning std::unordered_map newMap; diff --git a/src/buffer/out/UnicodeStorage.hpp b/src/buffer/out/UnicodeStorage.hpp index 0f2a629bd..d37a01a2a 100644 --- a/src/buffer/out/UnicodeStorage.hpp +++ b/src/buffer/out/UnicodeStorage.hpp @@ -55,7 +55,7 @@ public: void Erase(const key_type key); - void Remap(const std::map& rowMap, const std::optional width); + void Remap(const std::unordered_map& rowMap, const std::optional width); private: std::unordered_map _map; diff --git a/src/buffer/out/textBuffer.cpp b/src/buffer/out/textBuffer.cpp index 705c8d977..1f645aa14 100644 --- a/src/buffer/out/textBuffer.cpp +++ b/src/buffer/out/textBuffer.cpp @@ -872,7 +872,7 @@ UnicodeStorage& TextBuffer::GetUnicodeStorage() noexcept // - newRowWidth - Optional new value for the row width. void TextBuffer::_RefreshRowIDs(std::optional newRowWidth) { - std::map rowMap; + std::unordered_map rowMap; SHORT i = 0; for (auto& it : _storage) { diff --git a/src/cascadia/WpfTerminalControl/NativeMethods.cs b/src/cascadia/WpfTerminalControl/NativeMethods.cs index dd1731ed9..98ea4790c 100644 --- a/src/cascadia/WpfTerminalControl/NativeMethods.cs +++ b/src/cascadia/WpfTerminalControl/NativeMethods.cs @@ -37,6 +37,9 @@ namespace Microsoft.Terminal.Wpf /// WM_MOUSEACTIVATE = 0x0021, + /// + /// The WM_GETOBJECT message is sent by Active Accessibility when a client calls AccessibleObjectFromWindow or any of the other AccessibleObjectFromX APIs that retrieve an interface to an object. + /// WM_GETOBJECT = 0x003D, /// diff --git a/src/cascadia/WpfTerminalControl/TerminalContainer.cs b/src/cascadia/WpfTerminalControl/TerminalContainer.cs index 425378a49..e7938bb26 100644 --- a/src/cascadia/WpfTerminalControl/TerminalContainer.cs +++ b/src/cascadia/WpfTerminalControl/TerminalContainer.cs @@ -72,6 +72,9 @@ namespace Microsoft.Terminal.Wpf /// internal int Columns { get; private set; } + /// + /// Gets the window handle of the terminal. + /// internal IntPtr Hwnd => this.hwnd; /// @@ -238,7 +241,7 @@ namespace Microsoft.Terminal.Wpf NativeMethods.TerminalSetCursorVisible(this.terminal, true); ulong scanCode = (((ulong)lParam) & 0x00FF0000) >> 16; - NativeMethods.TerminalSendKeyEvent(this.terminal, (ushort)wParam, (ushort)(scanCode), true); + NativeMethods.TerminalSendKeyEvent(this.terminal, (ushort)wParam, (ushort)scanCode, true); this.blinkTimer?.Start(); break; } @@ -247,7 +250,7 @@ namespace Microsoft.Terminal.Wpf { // WM_KEYUP lParam layout documentation: https://docs.microsoft.com/en-us/windows/win32/inputdev/wm-keyup ulong scanCode = (((ulong)lParam) & 0x00FF0000) >> 16; - NativeMethods.TerminalSendKeyEvent(this.terminal, (ushort)wParam, (ushort)(scanCode), false); + NativeMethods.TerminalSendKeyEvent(this.terminal, (ushort)wParam, (ushort)scanCode, false); break; } diff --git a/src/interactivity/win32/windowUiaProvider.hpp b/src/interactivity/win32/windowUiaProvider.hpp index 2c475150c..9eea94ead 100644 --- a/src/interactivity/win32/windowUiaProvider.hpp +++ b/src/interactivity/win32/windowUiaProvider.hpp @@ -89,7 +89,7 @@ namespace Microsoft::Console::Interactivity::Win32 // eventually overflowing the stack. // We aren't using this as a cheap locking // mechanism for multi-threaded code. - std::map _signalEventFiring; + std::unordered_map _signalEventFiring; [[nodiscard]] HRESULT _EnsureValidHwnd() const; diff --git a/src/types/ScreenInfoUiaProviderBase.h b/src/types/ScreenInfoUiaProviderBase.h index 2fcc8e24e..53f7adabf 100644 --- a/src/types/ScreenInfoUiaProviderBase.h +++ b/src/types/ScreenInfoUiaProviderBase.h @@ -121,7 +121,7 @@ namespace Microsoft::Console::Types // eventually overflowing the stack. // We aren't using this as a cheap locking // mechanism for multi-threaded code. - std::map _signalFiringMapping{}; + std::unordered_map _signalFiringMapping{}; const COORD _getScreenBufferCoords() const; const TextBuffer& _getTextBuffer() const noexcept; diff --git a/src/types/inc/CodepointWidthDetector.hpp b/src/types/inc/CodepointWidthDetector.hpp index ae3a927e3..810b4bd7b 100644 --- a/src/types/inc/CodepointWidthDetector.hpp +++ b/src/types/inc/CodepointWidthDetector.hpp @@ -46,6 +46,6 @@ private: bool _checkFallbackViaCache(const std::wstring_view glyph) const; static unsigned int _extractCodepoint(const std::wstring_view glyph) noexcept; - mutable std::map _fallbackCache; + mutable std::unordered_map _fallbackCache; std::function _pfnFallbackMethod; };