From 68bea125e3621d1de2097489ad00294a7e51ff54 Mon Sep 17 00:00:00 2001 From: Rico Tiongson Date: Tue, 12 Feb 2019 17:50:58 +0800 Subject: [PATCH] Improve responsiveness of initial gesture by pre-empting xdotool in swipe_gesture constructor (#49) --- src/lib/gesture/swipe_gesture.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/lib/gesture/swipe_gesture.cpp b/src/lib/gesture/swipe_gesture.cpp index 1340a54..f2d0c02 100644 --- a/src/lib/gesture/swipe_gesture.cpp +++ b/src/lib/gesture/swipe_gesture.cpp @@ -49,7 +49,10 @@ 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}) - { } + { + // improve responsiveness of first gesture by pre-empting xdotool runtime + xdo_get_mouse_location(this->xdo, &this->ix, &this->iy, &this->screen_num); + } /** * Destructs this swipe gesture.