aboutsummaryrefslogtreecommitdiffstats
path: root/support/hololens/ServoApp/ServoControl/ServoControl.cpp
diff options
context:
space:
mode:
authorPaul Rouget <me@paulrouget.com>2019-08-20 10:10:07 +0200
committerPaul Rouget <me@paulrouget.com>2019-08-21 11:12:20 +0200
commitaaefaee5dc93bd0aa0c21e3d717e178b0145142b (patch)
treebd70a23e8fa64a7d4b6c3991b2eb2b11dee039f2 /support/hololens/ServoApp/ServoControl/ServoControl.cpp
parent5c1d130217db8ece7313d69a7e76130085d67e94 (diff)
downloadservo-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.cpp17
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);