8000 The first point in StylusPlugin is wrong when use the high DPI · Issue #6415 · dotnet/wpf · GitHub
[go: up one dir, main page]

Skip to content
The first point in StylusPlugin is wrong when use the high DPI #6415
@lindexi

Description

@lindexi
  • .NET Core Version: (e.g. 3.0 Preview1, or daily build number, use dotnet --info)
  • Windows version: (winver)
  • Does the bug reproduce also in WPF for .NET Framework 4.8?: Yes/No
  • Is this bug related specifically to tooling in Visual Studio (e.g. XAML Designer, Code editing, etc...)? If yes, please file the issue via the instructions here.
  • Security issues and bugs should be reported privately, learn more via our responsible disclosure guidelines.

Problem 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.

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:

  1. Set the touch screen DPI to 150% (Not 100% is enough)

Step:

  1. Create an empty WPF project.
  2. Add the InkCanvas control to WPF project.
  3. Run the project in the device with the touch screen and then try write an ink.

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

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    0