diff --git a/lib/gesture/swipe_gesture.cpp b/lib/gesture/swipe_gesture.cpp index dc30766..16d5580 100644 --- a/lib/gesture/swipe_gesture.cpp +++ b/lib/gesture/swipe_gesture.cpp @@ -86,7 +86,8 @@ namespace comfortable_swipe::gesture float scale = this->previous_gesture == swipe_gesture::FRESH ? 1.00f : 0.01f; // square root of 1/10 - if (this->x * this->x + this->y * this->y > this->threshold_squared * scale) + static const float EPSILON = 1e-6f; + if (this->x * this->x + this->y * this->y > this->threshold_squared * scale - EPSILON) { int mask = 0; if (this->fingers == 3) mask |= swipe_gesture::MSK_THREE_FINGERS; diff --git a/lib/service/debug.cpp b/lib/service/debug.cpp index cb95936..2efa702 100644 --- a/lib/service/debug.cpp +++ b/lib/service/debug.cpp @@ -28,7 +28,7 @@ namespace comfortable_swipe::service */ void debug() { - (void) std::system("stdbuf -oL -e0 libinput debug-events"); + (void) std::system("bash -c \"stdbuf -oL -e0 libinput debug-events 2> >(grep -v 'double tracking')\""); } } diff --git a/lib/service/start.cpp b/lib/service/start.cpp index 011dee0..9ab566e 100644 --- a/lib/service/start.cpp +++ b/lib/service/start.cpp @@ -31,9 +31,7 @@ namespace comfortable_swipe::service */ void start() { - (void) std::system("stdbuf -oL -e0 libinput debug-events | " __COMFORTABLE_SWIPE__PROGRAM__ " buffer " - // dont show double tracking bugs from libinput - "2> >(grep -v \"double tracking\")"); + (void) std::system(__COMFORTABLE_SWIPE__PROGRAM__ " debug | " __COMFORTABLE_SWIPE__PROGRAM__ " buffer"); } }