libts / tslib

Touchscreen access library
GNU Lesser General Public License v2.1
596 stars 290 forks source link

Add option to limit to calibration resolution #204

Open marcel-behlau-elfin opened 1 year ago

marcel-behlau-elfin commented 1 year ago

Adds an option to limit coordinates to calibration resolution. This can be useful for integration into qt, which rejects input events on coordinates outside of the screen resolution.

Background: OnPressed and OnReleased events are used in qml. While starting a touch event within a valid screen position and moving the finger outside of the screen, the release event is not triggered.

merge commented 2 days ago

I saw the same problem actually but solved it differently: I didn't want to change the linear filter but added a new one, named crop. It's documented here: https://github.com/libts/tslib?tab=readme-ov-file#module-crop and was already merged in this commit: https://github.com/libts/tslib/commit/f35d51b079b8ff6f186d7231e339d0b6e5b0bcdd

So if you simply add module crop as the very last line of your ts.conf file, this should be fixed for you.

thank you for your work and time though!