Closed lindexi closed 9 months ago
And I think the StylusLogic.GetAndCacheTransformToDeviceMatrix should return the first Matrix when the source is null.
When the wpf will set the stylusDevice.CriticalActiveSource
? The WispLogic.PreNotifyInput
will call the stylusDevice.UpdateState
method to calculate the ActiveSource in the Main UI Thread.
But the StylusPlugin is running in the Stylus Input
thread and fast than the UI thread.
I tested the my app for a week. This issue has been fixed and no new issues have been introduced.
@karelz Can I ask any plan about this issues? It will affect all touch applications.
I have cherry-picked my two PRs, https://github.com/dotnet/wpf/pull/6428 and https://github.com/dotnet/wpf/issues/6829, to build my private version of WPF. My application, which utilizes this private WPF version, has been running for almost two years now. Moreover, it has been performing well on millions of touch devices. This stands as a testament to the reliability of my PRs.
@lindexi Thanks a lot for your contributions. These PRs are currently not prioritized as the touch area isn't prioritized as of now from the team. We can prioritize it if the area receives more hits in terms of issues or more people running into this. Thanks again for the reliability data, I will try to get these 2 PRs in the next community test pass.
Thank you @singhashish-wpf
dotnet --info
)winver
)Security issues and bugs should be reported privately, learn more via our responsible disclosure guidelines.
Problem description:
After https://github.com/dotnet/wpf/pull/2891 , we call calculate the point with
stylusDevice.CriticalActiveSource
. But thestylusDevice.CriticalActiveSource
must be null when first touch down, because the wpf do not touch any element and do not get the AcitveSource before first touch down.Actual behavior:
All of the StylusPlugin will reviece the wrong coordinate point.
Expected behavior:
These points can be calculated correctly.
Minimal repro:
Before you try repro this issues, please make sure you own a touch screen.
Preparation:
Step:
Actual behavior: you will find the first point in ink will skew, just as the image shows.
The other repro step: Create an empty WPF project and add the StylusPlugin and then output the point received.
cc @rladuca @singhashish-wpf