Lifting the stylus out of proximity at the same time as lifting the palm off the touchpad generates some pointer events, usually a button click. This is caused by the in-kernel touch arbitration - after the stylus moves out of proximity the palm is still touching and generates one or two touch events. These trigger a click through the tapping code.
We'll need some workaround with a timer after proximity out before we accept new touches.
Author: Peter Hutterer <firstname.lastname@example.org>
Date: Mon Feb 19 14:00:42 2018 +1000
touchpad: delay arbitration by 90ms after touch toggle