This makes pinch and rotate in particular easier to perform.
if(!p.down)
return;
- /* At least one point needs to have moved more than the threshold to start
- the gesture. */
- bool threshold_exceeded = false;
- for(unsigned i=0; (i<MAX_POINTS && !threshold_exceeded); ++i)
- threshold_exceeded = (points[i].down && points[i].threshold_exceeded);
+ /* All held points need to have moved more than the threshold to start the
+ gesture. */
+ bool threshold_exceeded = true;
+ for(unsigned i=0; (i<MAX_POINTS && threshold_exceeded); ++i)
+ if(points[i].down && !points[i].threshold_exceeded)
+ threshold_exceeded = false;
if(!threshold_exceeded)
return;