Fix hyperlink not de-underlined in unfocused pane (#9039)
Ensures that: * All hyperlink related logic is running on unfocused pane * All unrelated logic is not running on unfocused pane Closes #8925
This commit is contained in:
parent
ed4e829adc
commit
40e328984d
|
@ -1353,22 +1353,16 @@ namespace winrt::Microsoft::Terminal::TerminalControl::implementation
|
|||
const auto cursorPosition = point.Position();
|
||||
const auto terminalPosition = _GetTerminalPosition(cursorPosition);
|
||||
|
||||
if (!_focused && (_terminal->GetHyperlinkAtPosition(terminalPosition).empty()))
|
||||
{
|
||||
args.Handled(true);
|
||||
return;
|
||||
}
|
||||
|
||||
if (ptr.PointerDeviceType() == Windows::Devices::Input::PointerDeviceType::Mouse || ptr.PointerDeviceType() == Windows::Devices::Input::PointerDeviceType::Pen)
|
||||
{
|
||||
if (_CanSendVTMouseInput())
|
||||
if (_focused && _CanSendVTMouseInput())
|
||||
{
|
||||
_TrySendMouseEvent(point);
|
||||
args.Handled(true);
|
||||
return;
|
||||
}
|
||||
|
||||
if (point.Properties().IsLeftButtonPressed())
|
||||
if (_focused && point.Properties().IsLeftButtonPressed())
|
||||
{
|
||||
auto lock = _terminal->LockForWriting();
|
||||
|
||||
|
@ -1457,7 +1451,7 @@ namespace winrt::Microsoft::Terminal::TerminalControl::implementation
|
|||
}
|
||||
}
|
||||
}
|
||||
else if (ptr.PointerDeviceType() == Windows::Devices::Input::PointerDeviceType::Touch && _touchAnchor)
|
||||
else if (_focused && ptr.PointerDeviceType() == Windows::Devices::Input::PointerDeviceType::Touch && _touchAnchor)
|
||||
{
|
||||
const auto contactRect = point.Properties().ContactRect();
|
||||
winrt::Windows::Foundation::Point newTouchPoint{ contactRect.X, contactRect.Y };
|
||||
|
|
Loading…
Reference in a new issue