Browse Source
Fire Tapped only on left button click.
pull/4504/head
José Pedro
6 years ago
No known key found for this signature in database
GPG Key ID: B8247B9301707B83
1 changed files with
5 additions and
2 deletions
-
src/Avalonia.Input/Gestures.cs
|
|
|
@ -96,8 +96,11 @@ namespace Avalonia.Input |
|
|
|
|
|
|
|
if (s_lastPress.TryGetTarget(out var target) && target == e.Source) |
|
|
|
{ |
|
|
|
var et = e.InitialPressMouseButton != MouseButton.Right ? TappedEvent : RightTappedEvent; |
|
|
|
e.Source.RaiseEvent(new RoutedEventArgs(et)); |
|
|
|
if (e.InitialPressMouseButton == MouseButton.Left || e.InitialPressMouseButton == MouseButton.Right) |
|
|
|
{ |
|
|
|
var et = e.InitialPressMouseButton != MouseButton.Right ? TappedEvent : RightTappedEvent; |
|
|
|
e.Source.RaiseEvent(new RoutedEventArgs(et)); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|