diff options
author | Paul Rouget <me@paulrouget.com> | 2019-08-20 10:10:07 +0200 |
---|---|---|
committer | Paul Rouget <me@paulrouget.com> | 2019-08-21 11:12:20 +0200 |
commit | aaefaee5dc93bd0aa0c21e3d717e178b0145142b (patch) | |
tree | bd70a23e8fa64a7d4b6c3991b2eb2b11dee039f2 /support/hololens/ServoApp/ServoControl/ServoControl.cpp | |
parent | 5c1d130217db8ece7313d69a7e76130085d67e94 (diff) | |
download | servo-aaefaee5dc93bd0aa0c21e3d717e178b0145142b.tar.gz servo-aaefaee5dc93bd0aa0c21e3d717e178b0145142b.zip |
Disable URL bar hit testing while scrolling in Servo
Diffstat (limited to 'support/hololens/ServoApp/ServoControl/ServoControl.cpp')
-rw-r--r-- | support/hololens/ServoApp/ServoControl/ServoControl.cpp | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/support/hololens/ServoApp/ServoControl/ServoControl.cpp b/support/hololens/ServoApp/ServoControl/ServoControl.cpp index 9de129c1e4e..bba1bce0aa5 100644 --- a/support/hololens/ServoApp/ServoControl/ServoControl.cpp +++ b/support/hololens/ServoApp/ServoControl/ServoControl.cpp @@ -32,9 +32,22 @@ void ServoControl::Shutdown() { } void ServoControl::OnLoaded(IInspectable const &, RoutedEventArgs const &) { - Panel().PointerReleased( + auto panel = Panel(); + panel.PointerReleased( std::bind(&ServoControl::OnSurfaceClicked, this, _1, _2)); - Panel().ManipulationDelta( + panel.ManipulationStarted( + [=](IInspectable const &, + Input::ManipulationStartedRoutedEventArgs const &e) { + mOnCaptureGesturesStartedEvent(); + e.Handled(true); + }); + panel.ManipulationCompleted( + [=](IInspectable const &, + Input::ManipulationCompletedRoutedEventArgs const &e) { + mOnCaptureGesturesEndedEvent(); + e.Handled(true); + }); + panel.ManipulationDelta( std::bind(&ServoControl::OnSurfaceManipulationDelta, this, _1, _2)); InitializeConditionVariable(&mGLCondVar); InitializeCriticalSection(&mGLLock); |