Browse Source

Ignore mouse move when left window (#13724)

#Conflicts:
#	src/Avalonia.Base/Input/PointerOverPreProcessor.cs
release/11.0.6
Lubomir Tetak 3 years ago
committed by Max Katz
parent
commit
cd18ff3ef9
  1. 13
      src/Avalonia.Base/Input/PointerOverPreProcessor.cs

13
src/Avalonia.Base/Input/PointerOverPreProcessor.cs

@ -42,12 +42,15 @@ namespace Avalonia.Input
}
if (args.Type is RawPointerEventType.LeaveWindow or RawPointerEventType.NonClientLeftButtonDown
&& _currentPointer is var (lastPointer, lastPosition))
or RawPointerEventType.TouchCancel or RawPointerEventType.TouchEnd)
{
_currentPointer = null;
ClearPointerOver(lastPointer, args.Root, 0, PointToClient(args.Root, lastPosition),
new PointerPointProperties(args.InputModifiers, args.Type.ToUpdateKind()),
args.InputModifiers.ToKeyModifiers());
if (_currentPointer is var (lastPointer, lastPosition))
{
_currentPointer = null;
ClearPointerOver(lastPointer, args.Root, 0, PointToClient(args.Root, lastPosition),
new PointerPointProperties(args.InputModifiers, args.Type.ToUpdateKind()),
args.InputModifiers.ToKeyModifiers());
}
}
else if (pointerDevice.TryGetPointer(args) is { } pointer
&& pointer.Type != PointerType.Touch)

Loading…
Cancel
Save