Skiasharp: SKGLView reports touch position incorrectly on UWP with UI scaling set to higher than 100%

Created on 24 Mar 2018  路  6Comments  路  Source: mono/SkiaSharp

This can be reproduced with the latest versions of SkiaSharp.Views.Forms 1.60.0 and Xamarin.Forms 2.5.0.280555 running on Windows 10 (FCU) with UI scaling set to more than 100%.

Reproduction steps

  1. Set SKGLView.EnableTouchEvents to true.
  2. Add an event handler to SKGLView.Touch event and watch reported pointer positions.
  3. Event handler is raised only until pointer reaches a certain position relative to window: [width / scale; height / scale]. Event handler is not being raised beyond this point even though the pointer is still located right over the SKGLView rendering area. Moreover, the reported pointer position is at all times scaled by UI scale.

Here is a simple repro solution.
SKGLViewBug.zip

area-SkiaSharp.Views area-SkiaSharp.Views.Forms type-bug

All 6 comments

Moving this out again so that we can release for //build

image

Moving this to v1.60.3 so we can get out a version that fixes a UWP bug (#536)

Any ideas about how to fix this @mattleibow ?
@AxelUser if you have time could you take a look?

I spent some time looking at this and decided to rewrite the entire view for UWP. The current way was a fair bit of a hack, the new version in the dev/update-m68 branch is much better and will also fix the #207 bug.

This is now fixed and in the upcoming 1.68.0-preview release.

Was this page helpful?
0 / 5 - 0 ratings