Skip to content

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

Merged
rchauhan18 merged 4 commits intodotnet:mainfrom
dotnet-campus:t/lindexi/FixStylusPluginHightDpi
Dec 11, 2023
Merged

Try fix the first point in StylusPlugin in high DPI#6428
rchauhan18 merged 4 commits intodotnet:mainfrom
dotnet-campus:t/lindexi/FixStylusPluginHightDpi

Conversation

@lindexi
Copy link
Member

@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 SamBent, dipeshmsft and singhashish-wpf 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

@azure-pipelines
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
Member 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 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

4 participants