-
Notifications
You must be signed in to change notification settings - Fork 8.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Touchpad scrolling not possible #979
Comments
Can you try setting a breakpoint in Two-finger scrolling works just fine with my surfacebook, so I'm thinking that it's something specific to your device. |
Okay I'm starting to feel a little stupid. I cleaned the solution and build CascadiaPackage on Debug x64 with the breakpoints in I need a little help how to get VS (2019) stopping at this class... |
You might be in need of this debugging doc. |
Maybe try something that you can be sure is hitting, like |
Thanks @DHowett-MSFT, missed that one! But now with a working debug-mode there are several memory-violation-exceptions popping by twinapi.appcore.dll which my VS for some reason cannot ignore... (The terminal does not crash though) Since it seems like nobody else is having these issues I will let it be and accept the fact, that something is wrong with my maschine. But I think its still interesting, that the new terminal is the only app where I am unable to scroll with two fingers. |
I have this issue as well though! My touchpad uses the Synaptics ClickPad drivers, not microsoft precision drivers, perhaps there is an issue there? |
@zadjii-msft , After some debugging:
The PointerWheelChanged handler bound to TermControl::_MouseScrollHandler is never called.
All other pointer handlers (and key handlers) work as expected. |
@rehnarama |
Could be, (Swedish locale here at least). I've also tried a minimal UWP app, and there were no problem with firing the PointerWheelChanged event there. I've just now noticed that, when disabling "Scroll Inactive Windows" in settings, the scrolling with an external mouse becomes unreliable as well! With unreliable I mean it works sometimes (when hovering over rendered text?), and then suddenly stops working (usually when trying to scroll empty area, but not always). Since scrolling inactive windows doesn't work with synaptics drivers, it might be a focusing issue of some sorts? Or perhaps turning off "Scroll Inactive Windows" setting would be a seperate issue? |
I really doubt that locale would affect mouse input, but I guess I'm not an expert in the input stack. The "scroll inactive windows think" might be a good lead on tracking this bug down though. Considering I don't believe anyone on the dev team has a device this is reproing on, the more help we can get the better :) |
I can't dig into this for the next four weeks... |
Doesn't work for me either. Terminal 0.10.761.0 This hasn't worked for me since I first installed WT last year. Mouse wheel scrolling hasn't worked either (haven't tried that with the 0.10 release yet though), is there a separate issue for mouse wheel scrolling or should that be covered here also? |
@wolf99 I'm sure that there's another issue that's tracking the mouse scrolling not working, but this one isn't it. I fortunately have a personal HP laptop that repros this bug with it's touchpad, so I'm going to be using that to debug and investigate. However, I'd doubt that this investigation would also apply to all mouse devices. I don't want you thinking that resolving this issue will also fix your mouse issue. |
@zadjii-msft Just tried 0.10 release with mouse, it's working now! 😄 |
Oh no this is horrifying. This might not apply super broadly, but this is what I've found with my investigation this morning. I've got a HP Spectre 2017 x360 that I use at home, with a touchpad using the synaptics drivers. From what I can tell, the Synaptics touchpads don't support "Scroll inactive windows" at all. Turns out, this is a very broad problem. Even info from 3 years ago points at solutions that are decades old (and not verified). What does this have to do with the Terminal? As it turns out, XAML Islands, which we're using to host our XAML content (read: the entire UI), uses an inactive HWND to host the XAML content. So we're never even getting the mouse events in I'm going to investigate if our root HWND gets the trackpad scrolling events that the XAML Island is ignoring. Maybe I can manually forward them to the XAML island somehow? I'm not overly optimistic at this point. /cc @Austin-Lamb @ocalvo |
@zadjii-msft, I'm using a Lenovo B590 using Synaptics Touchpad v7.5 drivers. notepad.exe scrolls fine. In fact, every app scrolls fine, except Microsoft Terminal... Any other app you would like me to test? |
FYI: A few releases back, it started working for me on an HP Spectre x360 with Synaptics drivers. |
does it scroll when you have another window in the foreground? (i.e. open two windows side by side, then try to scroll the inactive one.) |
@dkter, @zadjii-msft 🤦♂ You're right, it doesn't work... |
Huh that is really interesting. For example, I tried it earlier with Outlook in the foreground and Notepad in the background. But when I received this last mail, I tried it again. This time with Chrome/Gmail in the foreground. |
That probably explains why scroll doesn't work with VMWare or Virtualbox either |
I have the same behavior on my system. Scrolls fine with the touchpad while inactive when Settings is in the foreground; does not scroll when Chrome is in the foreground. When the window is active, my touchpad will not scroll at all. Mouse wheel works fine (in all cases). But I have never run into issues with any other applications with my touchpad (granted, it's an older model). Windows Terminal 0.10.781.0 |
Thanks for the clarification everyone! It seems like on my machine, I can also repro this behavior where different foreground apps change whether an inactive window can be scrolled or not. This is an incredibly peculiar bug, which might be partially related to this. I'm still trying to work on a workaround, but we'll see if that's possible or not :/ |
Also for good measure, let's link this to #979
@zadjii-msft Just checked out the branch you referenced. Looks promising! Fixes this issue for me 👍 BTW: Props to your commit messages 🥇 |
## 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.
Props on the effort here @zadjii-msft ! |
🎉This issue was addressed in #5131, which has now been successfully released as Handy links: |
I have confirmed that my ThinkPad Compact USB Keyboard with TrackPoint can scroll Windows Terminal. Thank you very much! |
It now works on my surface book. Thanks. |
Can confirm this is working on my HP Envy. Thanks! |
Environment
Windows build number: Microsoft Windows [Version 10.0.18898.1000]
Windows Terminal version (if applicable): pulled and built today (WindowsTerminalDev_0.0.1.0_x64__8wekyb3d8bbwe)
Steps to reproduce
Not entirely sure if this is intended behaviour or an issue to other users but I am not able to scroll through the new terminal with my touchpad on my Notebook (Alienware).
It works with my mouse but not with the touchpad. I can scroll through the native console/ poweshell though. Can somebody reproduce this?
Expected behavior
That I can scroll through the curren window-history using two-finger-touch on the touchpad.
Actual behavior
It wont scroll.
The text was updated successfully, but these errors were encountered: