mirror of
https://github.com/microsoft/terminal.git
synced 2026-05-17 15:36:35 +00:00
Compare commits
4 Commits
v1.25.1241
...
dev/migrie
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0a9ad5d453 | ||
|
|
3f5889e50e | ||
|
|
bd423abbf6 | ||
|
|
78d78fb07e |
@@ -237,6 +237,7 @@ namespace winrt::Microsoft::Terminal::Control::implementation
|
||||
const unsigned int pointerUpdateKind,
|
||||
const uint64_t timestamp,
|
||||
const ::Microsoft::Terminal::Core::ControlKeyStates modifiers,
|
||||
const bool thisClickFocused,
|
||||
const Core::Point pixelPosition)
|
||||
{
|
||||
const auto terminalPosition = _getTerminalPosition(til::point{ pixelPosition });
|
||||
@@ -309,8 +310,12 @@ namespace winrt::Microsoft::Terminal::Control::implementation
|
||||
auto contextArgs = winrt::make<ContextMenuRequestedEventArgs>(til::point{ pixelPosition }.to_winrt_point());
|
||||
ContextMenuRequested.raise(*this, contextArgs);
|
||||
}
|
||||
else
|
||||
else if (!thisClickFocused)
|
||||
{
|
||||
// GH#15803: Don't do this if this click activated our terminal
|
||||
// window. We don't want right-click activations of the window
|
||||
// to immediately paste the clipboard.
|
||||
|
||||
// Try to copy the text and clear the selection
|
||||
const auto successfulCopy = CopySelectionToClipboard(shiftEnabled, nullptr);
|
||||
_core->ClearSelection();
|
||||
|
||||
@@ -55,6 +55,7 @@ namespace winrt::Microsoft::Terminal::Control::implementation
|
||||
const unsigned int pointerUpdateKind,
|
||||
const uint64_t timestamp,
|
||||
const ::Microsoft::Terminal::Core::ControlKeyStates modifiers,
|
||||
const bool thisClickFocused,
|
||||
const Core::Point pixelPosition);
|
||||
void TouchPressed(const Core::Point contactPoint);
|
||||
|
||||
|
||||
@@ -40,6 +40,7 @@ namespace Microsoft.Terminal.Control
|
||||
UInt32 pointerUpdateKind,
|
||||
UInt64 timestamp,
|
||||
Microsoft.Terminal.Core.ControlKeyStates modifiers,
|
||||
Boolean thisClickFocused,
|
||||
Microsoft.Terminal.Core.Point pixelPosition);
|
||||
void TouchPressed(Microsoft.Terminal.Core.Point contactPoint);
|
||||
|
||||
|
||||
@@ -1550,7 +1550,9 @@ namespace winrt::Microsoft::Terminal::Control::implementation
|
||||
// again to bring it up.
|
||||
InputPane::GetForCurrentView().TryShow();
|
||||
|
||||
if (!_focused)
|
||||
const bool thisClickFocused = !_focused;
|
||||
|
||||
if (thisClickFocused)
|
||||
{
|
||||
Focus(FocusState::Pointer);
|
||||
}
|
||||
@@ -1572,6 +1574,7 @@ namespace winrt::Microsoft::Terminal::Control::implementation
|
||||
TermControl::GetPointerUpdateKind(point),
|
||||
point.Timestamp(),
|
||||
ControlKeyStates{ args.KeyModifiers() },
|
||||
thisClickFocused,
|
||||
_toTerminalOrigin(cursorPosition).to_core_point());
|
||||
}
|
||||
|
||||
|
||||
@@ -319,6 +319,7 @@ namespace ControlUnitTests
|
||||
WM_LBUTTONDOWN, //pointerUpdateKind
|
||||
0, // timestamp
|
||||
modifiers,
|
||||
false,
|
||||
cursorPosition0.to_core_point());
|
||||
Log::Comment(L"Verify that there's not yet a selection");
|
||||
|
||||
@@ -367,6 +368,7 @@ namespace ControlUnitTests
|
||||
WM_LBUTTONDOWN, //pointerUpdateKind
|
||||
0, // timestamp
|
||||
modifiers,
|
||||
false,
|
||||
cursorPosition3.to_core_point());
|
||||
Log::Comment(L"Verify that there's now no selection");
|
||||
VERIFY_IS_FALSE(core->HasSelection());
|
||||
@@ -419,6 +421,7 @@ namespace ControlUnitTests
|
||||
WM_LBUTTONDOWN, //pointerUpdateKind
|
||||
0, // timestamp
|
||||
modifiers,
|
||||
false,
|
||||
cursorPosition0.to_core_point());
|
||||
|
||||
Log::Comment(L"Verify that there's not yet a selection");
|
||||
@@ -568,6 +571,7 @@ namespace ControlUnitTests
|
||||
WM_LBUTTONDOWN, //pointerUpdateKind
|
||||
0, // timestamp
|
||||
modifiers,
|
||||
false,
|
||||
cursorPosition0.to_core_point());
|
||||
|
||||
Log::Comment(L"Verify that there's not yet a selection");
|
||||
@@ -613,6 +617,7 @@ namespace ControlUnitTests
|
||||
WM_LBUTTONDOWN, //pointerUpdateKind
|
||||
0, // timestamp
|
||||
modifiers,
|
||||
false,
|
||||
cursorPosition0.to_core_point());
|
||||
|
||||
Log::Comment(L"Verify that there's not yet a selection");
|
||||
@@ -731,6 +736,7 @@ namespace ControlUnitTests
|
||||
WM_LBUTTONDOWN, //pointerUpdateKind
|
||||
0, // timestamp
|
||||
modifiers,
|
||||
false,
|
||||
cursorPosition0.to_core_point());
|
||||
Log::Comment(L"Verify that there's not yet a selection");
|
||||
|
||||
@@ -782,6 +788,7 @@ namespace ControlUnitTests
|
||||
WM_LBUTTONDOWN, //pointerUpdateKind
|
||||
0, // timestamp
|
||||
modifiers,
|
||||
false,
|
||||
cursorPosition0.to_core_point());
|
||||
|
||||
Log::Comment(L"Verify that there's not yet a selection");
|
||||
@@ -936,6 +943,7 @@ namespace ControlUnitTests
|
||||
WM_LBUTTONDOWN, //pointerUpdateKind
|
||||
0, // timestamp
|
||||
modifiers,
|
||||
false,
|
||||
cursorPosition0.to_core_point());
|
||||
}
|
||||
|
||||
@@ -985,6 +993,7 @@ namespace ControlUnitTests
|
||||
WM_LBUTTONDOWN, //pointerUpdateKind
|
||||
0, // timestamp
|
||||
modifiers,
|
||||
false,
|
||||
cursorPosition0.to_core_point());
|
||||
VERIFY_ARE_EQUAL(0u, expectedOutput.size(), L"Validate we drained all the expected output");
|
||||
|
||||
@@ -1001,6 +1010,7 @@ namespace ControlUnitTests
|
||||
WM_LBUTTONDOWN, //pointerUpdateKind
|
||||
0, // timestamp
|
||||
modifiers,
|
||||
false,
|
||||
cursorPosition1.to_core_point());
|
||||
VERIFY_ARE_EQUAL(0u, expectedOutput.size(), L"Validate we drained all the expected output");
|
||||
|
||||
@@ -1016,6 +1026,7 @@ namespace ControlUnitTests
|
||||
WM_LBUTTONDOWN, //pointerUpdateKind
|
||||
0, // timestamp
|
||||
modifiers,
|
||||
false,
|
||||
cursorPosition0.to_core_point());
|
||||
// Flush it out.
|
||||
conn->WriteInput(L"sentinel");
|
||||
@@ -1033,6 +1044,7 @@ namespace ControlUnitTests
|
||||
WM_LBUTTONDOWN, //pointerUpdateKind
|
||||
0, // timestamp
|
||||
modifiers,
|
||||
false,
|
||||
cursorPosition1.to_core_point());
|
||||
|
||||
Log::Comment(L" --- Resize the terminal to be 10 columns wider ---");
|
||||
@@ -1047,6 +1059,7 @@ namespace ControlUnitTests
|
||||
WM_LBUTTONDOWN, //pointerUpdateKind
|
||||
0, // timestamp
|
||||
modifiers,
|
||||
false,
|
||||
cursorPosition1.to_core_point());
|
||||
VERIFY_ARE_EQUAL(0u, expectedOutput.size(), L"Validate we drained all the expected output");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user