diff --git a/src/lib/gesture/pinch_gesture.cpp b/src/lib/gesture/pinch_gesture.cpp index 6f8fce7..22beba1 100644 --- a/src/lib/gesture/pinch_gesture.cpp +++ b/src/lib/gesture/pinch_gesture.cpp @@ -22,6 +22,7 @@ along with this program. If not, see . */ #include // std::cout, std::endl +#include // std::regex, std::cmatch, std::regex_match #include "xdo_gesture.h" extern "C" @@ -62,7 +63,7 @@ namespace comfortable_swipe::gesture */ inline void pinch_gesture::begin() { - this->previous_gesture = swipe_gesture::FRESH; + this->previous_gesture = pinch_gesture::FRESH; this->previous_radius = this->radius; } @@ -76,11 +77,11 @@ namespace comfortable_swipe::gesture // TODO: use a different epsilon threshold const float EPSILON = this->threshold; - if (this->delta_radius > EPSILON) + if (delta_radius > EPSILON) { // TODO: pinch out } - else if (this->delta_radius < -EPSILON) + else if (delta_radius < -EPSILON) { // TODO: pinch in } diff --git a/src/lib/gesture/pinch_gesture.h b/src/lib/gesture/pinch_gesture.h index f95f1c1..1123cf5 100644 --- a/src/lib/gesture/pinch_gesture.h +++ b/src/lib/gesture/pinch_gesture.h @@ -42,6 +42,7 @@ namespace comfortable_swipe::gesture ); ~pinch_gesture(); + int fingers; float radius; inline void begin() override;