mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
Use Tapped event instead of PointerReleased
This commit is contained in:
parent
eee2c895f4
commit
010bc0036d
4 changed files with 8 additions and 8 deletions
|
@ -36,7 +36,7 @@ void ServoControl::Shutdown() {
|
|||
|
||||
void ServoControl::OnLoaded(IInspectable const &, RoutedEventArgs const &) {
|
||||
auto panel = Panel();
|
||||
panel.PointerReleased(
|
||||
panel.Tapped(
|
||||
std::bind(&ServoControl::OnSurfaceClicked, this, _1, _2));
|
||||
panel.ManipulationStarted(
|
||||
[=](IInspectable const &,
|
||||
|
@ -95,10 +95,10 @@ void ServoControl::OnSurfaceManipulationDelta(
|
|||
}
|
||||
|
||||
void ServoControl::OnSurfaceClicked(IInspectable const &,
|
||||
Input::PointerRoutedEventArgs const &e) {
|
||||
auto coords = e.GetCurrentPoint(Panel());
|
||||
auto x = coords.Position().X * mDPI;
|
||||
auto y = coords.Position().Y * mDPI;
|
||||
Input::TappedRoutedEventArgs const &e) {
|
||||
auto coords = e.GetPosition(Panel());
|
||||
auto x = coords.X * mDPI;
|
||||
auto y = coords.Y * mDPI;
|
||||
RunOnGLThread([=] { mServo->Click(x, y); });
|
||||
e.Handled(true);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue