terminal/src/cascadia/WindowsTerminal
Mike Griese a12a6285f5
Manually pass mouse wheel messages to TermControls (#5131)
## Summary of the Pull Request

As we've learned in #979, not all touchpads are created equal. Some of them have bad drivers that makes scrolling inactive windows not work. For whatever reason, these devices think the Terminal is all one giant inactive window, so we don't get the mouse wheel events through the XAML stack. We do however get the event as a `WM_MOUSEWHEEL` on those devices (a message we don't get on devices with normally functioning trackpads).

This PR attempts to take that `WM_MOUSEWHEEL` and manually dispatch it to the `TermControl`, so we can at least scroll the terminal content.

Unfortunately, this solution is not very general purpose. This only works to scroll controls that manually implement our own `IMouseWheelListener` interface. As we add more controls, we'll need to continue manually implementing this interface, until the underlying XAML Islands bug is fixed. **I don't love this**. I'd rather have a better solution, but it seems that we can't synthesize a more general-purpose `PointerWheeled` event that could get routed through the XAML tree as normal. 

## References

* #2606 and microsoft/microsoft-ui-xaml#2101 - these bugs are also tracking a similar "inactive windows" / "scaled mouse events" issue in XAML

## PR Checklist
* [x] Closes #979
* [x] I work here
* [ ] Tests added/passed
* [n/a] Requires documentation to be updated

## Detailed Description of the Pull Request / Additional comments

I've also added a `til::point` conversion _to_ `winrt::Windows::Foundation::Point`, and some scaling operators for `point`

## Validation Steps Performed

* It works on my HP Spectre 2017 with a synaptics trackpad
  - I also made sure to test that `tmux` works in panes on this laptop
* It works on my slaptop, and DOESN'T follow this hack codepath on this machine.
2020-04-01 16:58:16 +00:00
..
AppHost.cpp Manually pass mouse wheel messages to TermControls (#5131) 2020-04-01 16:58:16 +00:00
AppHost.h Manually pass mouse wheel messages to TermControls (#5131) 2020-04-01 16:58:16 +00:00
BaseWindow.h Fix a bunch of spelling errors across the project (#4295) 2020-02-10 20:40:01 +00:00
IslandWindow.cpp Manually pass mouse wheel messages to TermControls (#5131) 2020-04-01 16:58:16 +00:00
IslandWindow.h Manually pass mouse wheel messages to TermControls (#5131) 2020-04-01 16:58:16 +00:00
main.cpp Tunnel F7 keypresses directly into special handlers in TermControl (#4807) 2020-03-05 20:35:46 +00:00
NonClientIslandWindow.cpp ci: run spell check in CI, fix remaining issues (#4799) 2020-03-25 11:02:53 -07:00
NonClientIslandWindow.h Snap to character grid when resizing window (#3181) 2020-01-08 13:19:23 -08:00
packages.config Make the window border actually follow the user's theme (#5105) 2020-03-24 19:47:01 +00:00
pch.cpp Initial release of the Windows Terminal source code 2019-05-02 15:29:04 -07:00
pch.h Manually pass mouse wheel messages to TermControls (#5131) 2020-04-01 16:58:16 +00:00
resource.h Add support for commandline args to wt.exe (#4023) 2020-01-27 15:34:12 +00:00
WindowsTerminal.def Initial release of the Windows Terminal source code 2019-05-02 15:29:04 -07:00
WindowsTerminal.manifest TURNS OUT CASE SENSITIVITY IS IMPORTANT (#2481) 2019-08-20 11:16:06 -07:00
WindowsTerminal.rc Add support for commandline args to wt.exe (#4023) 2020-01-27 15:34:12 +00:00
WindowsTerminal.vcxproj Make the window border actually follow the user's theme (#5105) 2020-03-24 19:47:01 +00:00
WindowUiaProvider.cpp Upgrade UiaProviders to WRL::ComPtr (#3051) 2019-11-21 16:08:37 -08:00
WindowUiaProvider.hpp Upgrade UiaProviders to WRL::ComPtr (#3051) 2019-11-21 16:08:37 -08:00