diff --git a/lib/gesture/swipe_gesture.cpp b/lib/gesture/swipe_gesture.cpp index 7dcea37..a8ba7c9 100644 --- a/lib/gesture/swipe_gesture.cpp +++ b/lib/gesture/swipe_gesture.cpp @@ -50,7 +50,8 @@ namespace comfortable_swipe::gesture ): comfortable_swipe::gesture::xdo_gesture(), threshold_squared(threshold*threshold), - commands(new const char*[8]{left3, left4, right3, right4, up3, up4, down3, down4}) + commands(new const char*[8]{left3, left4, right3, right4, up3, up4, down3, down4}), + flag_swiping(false) { // improve responsiveness of first gesture by pre-empting xdotool runtime xdo_get_mouse_location(this->xdo, &this->ix, &this->iy, &this->screen_num); diff --git a/lib/service/buffer.cpp b/lib/service/buffer.cpp index 3c7064d..7edd7b6 100644 --- a/lib/service/buffer.cpp +++ b/lib/service/buffer.cpp @@ -20,6 +20,7 @@ along with this program. If not, see . */ #include // fgets_unlocked, stdin +#include // std::ios, std::cout, std::cin #include "../index.hpp" /** @@ -29,6 +30,11 @@ namespace comfortable_swipe::service { void buffer() { + std::ios::sync_with_stdio(false); + std::cin.tie(0); + std::cout.tie(0); + std::cout.flush(); + // read config file auto config = comfortable_swipe::util::read_config_file(comfortable_swipe::util::conf_filename());