Skip to content

Commit

Permalink
Stylus Selection Support (#2586)
Browse files Browse the repository at this point in the history
  • Loading branch information
carlos-zamora authored Sep 10, 2019
1 parent 429af0e commit 2ac2497
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/cascadia/TerminalControl/TermControl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -732,7 +732,7 @@ namespace winrt::Microsoft::Terminal::TerminalControl::implementation
const auto ptr = args.Pointer();
const auto point = args.GetCurrentPoint(_root);

if (ptr.PointerDeviceType() == Windows::Devices::Input::PointerDeviceType::Mouse)
if (ptr.PointerDeviceType() == Windows::Devices::Input::PointerDeviceType::Mouse || ptr.PointerDeviceType() == Windows::Devices::Input::PointerDeviceType::Pen)
{
// Ignore mouse events while the terminal does not have focus.
// This prevents the user from selecting and copying text if they
Expand Down Expand Up @@ -818,7 +818,7 @@ namespace winrt::Microsoft::Terminal::TerminalControl::implementation
const auto ptr = args.Pointer();
const auto point = args.GetCurrentPoint(_root);

if (ptr.PointerDeviceType() == Windows::Devices::Input::PointerDeviceType::Mouse)
if (ptr.PointerDeviceType() == Windows::Devices::Input::PointerDeviceType::Mouse || ptr.PointerDeviceType() == Windows::Devices::Input::PointerDeviceType::Pen)
{
if (point.Properties().IsLeftButtonPressed())
{
Expand Down Expand Up @@ -897,7 +897,7 @@ namespace winrt::Microsoft::Terminal::TerminalControl::implementation

const auto ptr = args.Pointer();

if (ptr.PointerDeviceType() == Windows::Devices::Input::PointerDeviceType::Mouse)
if (ptr.PointerDeviceType() == Windows::Devices::Input::PointerDeviceType::Mouse || ptr.PointerDeviceType() == Windows::Devices::Input::PointerDeviceType::Pen)
{
const auto modifiers = static_cast<uint32_t>(args.KeyModifiers());
// static_cast to a uint32_t because we can't use the WI_IsFlagSet
Expand Down

0 comments on commit 2ac2497

Please sign in to comment.