Closed quo closed 1 year ago
Wow, yeah, thats kind of a stupid mistake that I made. Its been there for months (since I added support for the basic touch processing). I also was pretty sure I tested the code after I added the narrowing, but idk, maybe I got some stupid edgecase.
Your fix is correct, thank you.
For me, the current iptsd immediately crashes on touch with a narrowing_error.
The problem is in touch-manager: https://github.com/linux-surface/iptsd/blob/8a187c578e0f31e91dfdc3a456858acc2724240d/src/daemon/touch-manager.cpp#L74-L81
As far as I can tell,
this->diagonal
is initialized to zero and never changed anywhere. So d1, d2, major, and minor are all infinity, and the narrow fails.Replacing
this->diagonal
byprocessor.diagonal()
works (but I'm not entirely sure it's the correct fix).