Skip to content

Commit

Permalink
fix some errors and PR comments
Browse files Browse the repository at this point in the history
  • Loading branch information
carlos-zamora committed Mar 11, 2020
1 parent cb449e4 commit 125e502
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 7 deletions.
10 changes: 5 additions & 5 deletions src/cascadia/TerminalControl/TermControl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -820,7 +820,7 @@ namespace winrt::Microsoft::Terminal::TerminalControl::implementation
// - point: the PointerPoint object representing a mouse event from our XAML input handler
// - goingDown: true, if the button was pressed. False, if it was released.
// Mouse moved events must only be encoded as the button being pressed, not released.
bool TermControl::_TrySendMouseEvent(Windows::UI::Input::PointerPoint const& point, bool goingDown)
bool TermControl::_TrySendMouseEvent(Windows::UI::Input::PointerPoint const& point)
{
// If the user is holding down Shift, suppress mouse events
// TODO GH#4875: disable/customize this functionality
Expand Down Expand Up @@ -907,7 +907,7 @@ namespace winrt::Microsoft::Terminal::TerminalControl::implementation
const auto altEnabled = WI_IsFlagSet(modifiers, static_cast<uint32_t>(VirtualKeyModifiers::Menu));
const auto shiftEnabled = WI_IsFlagSet(modifiers, static_cast<uint32_t>(VirtualKeyModifiers::Shift));

if (_TrySendMouseEvent(point, true))
if (_TrySendMouseEvent(point))
{
args.Handled(true);
return;
Expand Down Expand Up @@ -995,7 +995,7 @@ namespace winrt::Microsoft::Terminal::TerminalControl::implementation

if (ptr.PointerDeviceType() == Windows::Devices::Input::PointerDeviceType::Mouse || ptr.PointerDeviceType() == Windows::Devices::Input::PointerDeviceType::Pen)
{
if (_TrySendMouseEvent(point, true))
if (_TrySendMouseEvent(point))
{
args.Handled(true);
return;
Expand Down Expand Up @@ -1092,7 +1092,7 @@ namespace winrt::Microsoft::Terminal::TerminalControl::implementation
// macro directly with a VirtualKeyModifiers
const auto shiftEnabled = WI_IsFlagSet(modifiers, static_cast<uint32_t>(VirtualKeyModifiers::Shift));

if (_TrySendMouseEvent(point, false))
if (_TrySendMouseEvent(point))
{
args.Handled(true);
return;
Expand Down Expand Up @@ -1148,7 +1148,7 @@ namespace winrt::Microsoft::Terminal::TerminalControl::implementation
const auto ctrlPressed = WI_IsFlagSet(modifiers, static_cast<uint32_t>(VirtualKeyModifiers::Control));
const auto shiftPressed = WI_IsFlagSet(modifiers, static_cast<uint32_t>(VirtualKeyModifiers::Shift));

if (_TrySendMouseEvent(point, true))
if (_TrySendMouseEvent(point))
{
args.Handled(true);
return;
Expand Down
2 changes: 1 addition & 1 deletion src/cascadia/TerminalControl/TermControl.h
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ namespace winrt::Microsoft::Terminal::TerminalControl::implementation

::Microsoft::Terminal::Core::ControlKeyStates _GetPressedModifierKeys() const;
bool _TrySendKeyEvent(const WORD vkey, const WORD scanCode, ::Microsoft::Terminal::Core::ControlKeyStates modifiers);
bool _TrySendMouseEvent(Windows::UI::Input::PointerPoint const& point, bool goingDown);
bool _TrySendMouseEvent(Windows::UI::Input::PointerPoint const& point);

const COORD _GetTerminalPosition(winrt::Windows::Foundation::Point cursorPosition);
const unsigned int _NumberOfClicks(winrt::Windows::Foundation::Point clickPos, Timestamp clickTime);
Expand Down
1 change: 0 additions & 1 deletion src/cascadia/TerminalCore/TerminalApi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -567,5 +567,4 @@ bool Terminal::IsVtInputEnabled() const noexcept
{
// We should never be getting this call in Terminal.
FAIL_FAST();
return true;
}

0 comments on commit 125e502

Please sign in to comment.