Skip to content

Commit

Permalink
Improve responsiveness of initial gesture by pre-empting xdotool in s…
Browse files Browse the repository at this point in the history
…wipe_gesture constructor (#49)
  • Loading branch information
Hikari9 authored Feb 12, 2019
1 parent 0b3b323 commit 68bea12
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/lib/gesture/swipe_gesture.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 68bea12

Please sign in to comment.