From 0940ef2e78f76e3fbb106194b07b7b1ae06fdec7 Mon Sep 17 00:00:00 2001 From: Max Katz Date: Thu, 7 Nov 2024 20:12:11 -0800 Subject: [PATCH] Handle previously missed event types in PenDevice --- src/Avalonia.Base/Input/PenDevice.cs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/Avalonia.Base/Input/PenDevice.cs b/src/Avalonia.Base/Input/PenDevice.cs index c98e69de30a..3f168f66b02 100644 --- a/src/Avalonia.Base/Input/PenDevice.cs +++ b/src/Avalonia.Base/Input/PenDevice.cs @@ -64,9 +64,17 @@ private void ProcessRawEvent(RawPointerEventArgs e) shouldReleasePointer = true; break; case RawPointerEventType.LeftButtonDown: + case RawPointerEventType.RightButtonDown: + case RawPointerEventType.MiddleButtonDown: + case RawPointerEventType.XButton1Down: + case RawPointerEventType.XButton2Down: e.Handled = PenDown(pointer, e.Timestamp, e.Root, e.Position, props, keyModifiers, e.InputHitTestResult.firstEnabledAncestor); break; case RawPointerEventType.LeftButtonUp: + case RawPointerEventType.RightButtonUp: + case RawPointerEventType.MiddleButtonUp: + case RawPointerEventType.XButton1Up: + case RawPointerEventType.XButton2Up: if (_releasePointerOnPenUp) { shouldReleasePointer = true;