jaytwo / WmTouchDevice

Raise WPF touch events using WM_TOUCH instead of the lag-prone default implementation.
25 stars 11 forks source link

Touch point has constant offset #3

Open tmatz opened 4 years ago

tmatz commented 4 years ago

Hello. Thank you for sharing such a great job!

When trying WpfSample, touch point has constant offset.

screenshot

I tried to fix this problem https://github.com/tmatz/WmTouchDevice/commit/bbee1a81cd22001d3acc63a71bf6e752f60e8d7b .

Does this fix make sense?

Is there any intent to get the position of the window using reflection?

jaytwo commented 4 years ago

That's interesting - I hadn't seen or heard about this before. The application I developed it for was normally (although not always) maximised, and also tested before high-DPI touchscreens we common. Is your touchscreen display scaled above 100%, and if so, does 100% scale hide the issue?

Unfortunately I don't currently have a touch-screen to explore and test this with the different supported .NET versions at the moment, which is my only reservation about adding reflection-based solutions.

tmatz commented 4 years ago

Thank you for reply!

I checked display scale. It has been 100%. I changed it 125%, and back to 100%, but both has constant offset.

In #1 you said

Feedback in sample appears vertically offset by roughly the height of the title bar, but this is a nice demo, thank you!

Your application may not have a window title. The interesting thing is that in my environment there is also a horizontal offset.

Reflection is used for supporting old .NET version.