Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Try fix the first point in StylusPlugin in high DPI #6428

Merged

Conversation

lindexi
Copy link
Contributor

@lindexi lindexi commented Apr 14, 2022

Fixes #6415

Description

After #2891 , we call calculate the point with stylusDevice.CriticalActiveSource. But the stylusDevice.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.

We should input the PresentationSource to GetAndCacheTransformToDeviceMatrix to get the expected Matrix. So I replace the report.InputSource to stylusDevice.CriticalActiveSource when the stylusDevice.CriticalActiveSource is null.

Customer Impact

Fix #6415

The coordinates of the points are correct in StylusPlugin.

Regression

Regression in PR #2891

Testing

I test the code in my touch screen with high DPI. And I build it in https://github.com/dotnet-campus/wpf/actions/runs/2164903389

Risk

All of the application which run in the device with touch screen.

@rladuca Could you review my code?

Microsoft Reviewers: Open in CodeFlow

@lindexi lindexi requested a review from a team as a code owner April 14, 2022 03:35
@ghost ghost assigned lindexi Apr 14, 2022
@ghost ghost added the PR metadata: Label to tag PRs, to facilitate with triage label Apr 14, 2022
@ghost ghost requested review from dipeshmsft, singhashish-wpf and SamBent April 14, 2022 03:35
@ghost ghost added the Community Contribution A label for all community Contributions label Apr 14, 2022
@rchauhan18
Copy link
Contributor

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@rchauhan18
Copy link
Contributor

@dotnet-policy-service rerun

@rchauhan18
Copy link
Contributor

Thanks @lindexi for your contribution!

@lindexi
Copy link
Contributor Author

lindexi commented Dec 11, 2023

Thank you @rchauhan18

@github-actions github-actions bot locked and limited conversation to collaborators Jan 11, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Community Contribution A label for all community Contributions Included in test pass PR metadata: Label to tag PRs, to facilitate with triage
Projects
None yet
Development

Successfully merging this pull request may close these issues.

The first point in StylusPlugin is wrong when use the high DPI
2 participants