Browse Source

Reset scroller valuators on XI2Manager.cs (#16185)

When the focus is lost to avoid instant jumps when coming/scrolling from another linux window.
pull/16220/head
Jumar Macato 2 years ago
committed by GitHub
parent
commit
53b8c6dd28
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 5
      src/Avalonia.X11/XI2Manager.cs

5
src/Avalonia.X11/XI2Manager.cs

@ -217,6 +217,11 @@ namespace Avalonia.X11
detail == XiEnterLeaveDetail.XINotifyVirtual)
&& buttons == default)
{
foreach (var scroller in _pointerDevice.Scrollers)
{
_pointerDevice.Valuators[scroller.Number].Value = 0;
}
client.ScheduleXI2Input(new RawPointerEventArgs(client.MouseDevice, (ulong)ev.time.ToInt64(),
client.InputRoot,
RawPointerEventType.LeaveWindow, new Point(ev.event_x, ev.event_y), buttons));

Loading…
Cancel
Save