Incorrect Implementation of GetIntermediatePoints Method in UNO Framework #17527
Labels
area/skia ✏️
Categorizes an issue or PR as relevant to Skia
difficulty/medium 🤔
Categorizes an issue for which the difficulty level is reachable with a good understanding of WinUI
kind/bug
Something isn't working
project/input ⌨️
Categorizes an issue or PR as relevant to input (Button, CheckBox, Toggle, Scroll, Map, Numeric,...)
Current behavior
I have discovered an issue with the implementation of the GetIntermediatePoints method in the UNO Framework.
In the design of WinUI or UWP, developers can use GetIntermediatePoints to obtain historical input point data. This is particularly useful when the UI is busy, as it means that when the UI is unable to process input points in time, the accumulated input points will be added to the historical input point data, preventing a large number of input triggers from further slowing down the UI.
However, in the UNO Framework, the GetIntermediatePoints method is not implemented correctly. Instead of returning historical input point data, it only returns the current point. This means that in the UNO Framework, when the UI is too busy to process input, it will continuously trigger input events or lose input data. On the X11 platform, this will exacerbate UI lag by continuously triggering input events. On the WPF platform, this will result in lost input data.
Expected behavior
I would like to see the GetIntermediatePoints method in the UNO Framework implemented in the same way as in WinUI, where input points are collected and added to the historical input point data when the UI is too busy. This would reduce the triggering of input events when the UI thread is unable to process input data in time.
How to reproduce it (as minimally and precisely as possible)
Run the project between WinUI and UNO. And you can find the count of GetIntermediatePoints will always be one.
You can find my demo code in https://github.com/lindexi/lindexi_gd/tree/1111c23e4c76a3aa7e3418db8ff7b6661cd0d1d2/UnoDemo/NeejabaykugoWerjekeeja
Workaround
No response
Works on UWP/WinUI
Yes
Environment
No response
NuGet package version(s)
gloabl.json
Affected platforms
Skia (WPF), Skia (Linux X11), Skia (macOS), Skia (Linux Framebuffer), Skia (GTK)
IDE
Visual Studio 2022
IDE version
No response
Relevant plugins
No response
Anything else we need to know?
uno/src/Uno.UWP/UI/Core/PointerEventArgs.cs
Lines 21 to 22 in 9079a08
uno/src/Uno.UI/UI/Xaml/Input/PointerRoutedEventArgs.cs
Lines 49 to 50 in 9079a08
The text was updated successfully, but these errors were encountered: