Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upUWP: Handle touch events #24778
UWP: Handle touch events #24778
Conversation
| @@ -1,3 +1,3 @@ | |||
| #pragma once | |||
|
|
|||
| #define DEFAULT_URL L"https://servo.org/hl-home/"; | |||
| #define DEFAULT_URL L"https://manishearth.net/sand/inputs.html"; | |||
This comment has been minimized.
This comment has been minimized.
| if (e.Pointer().PointerDeviceType() == | ||
| Windows::Devices::Input::PointerDeviceType::Mouse) { | ||
| IInspectable const &, Input::PointerRoutedEventArgs const &e, bool down) { | ||
| log("pointer pressed"); |
This comment has been minimized.
This comment has been minimized.
|
r=me with the nits addressed. This fixes part of #24598. |
|
Before landing that, let me take a look at the scrolling problem you mentioned. |
|
Updated. |
|
After testing this, I think we need to investigate a bit more what should be done here. Scrolling is badly broken. If the main issue you want to address here is the missed click events, maybe that's something we should be reporting the MS people. We could disable the ManipulationDelta, but we would lose the native scroll behavior. It's, in general, something I'd like to avoid across our different ports. |
|
If found few issues with the touch events:
I've investigating all these issues. |
|
I think I managed to fix most of the weirdness. |
Manishearth commentedNov 19, 2019
•
edited
Fixes #24698
This means that we can start using the click emulation from https://github.com/servo/servo/blob/master/components/compositing/touch.rs , which is better at handling this than UWP. UWP requires a specific short tap to trigger OnTapped, and lots of folks seem to have trouble doing that.
I'm not 100% sure if this is correct since it doesn't quite disable the existing scroll handling (the ManipulationDelta stuff); I'm wondering if we should. Removing that code seems to make scrolling a bit jumpy (i also got some random zoom events?), which is counterintuitive -- if anything it should be jumpy when we have multiple scroll systems active! If the existing manipulation delta code is not removed,
preventDefault()on touch events does not prevent scrolling, which isn't great.r? @paulrouget
cc @jdm