Skip to content

Commit 89b79bc

Browse files
authored
Status command (#56)
* Add configurations to status * Update comment of status * Add config command * Modify README * Add EPSILON instead of subtract for a more reliable >= threshold
1 parent 7d76db6 commit 89b79bc

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

lib/gesture/swipe_gesture.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,8 @@ namespace comfortable_swipe::gesture
8787
? 1.00f
8888
: 0.01f; // square root of 1/10
8989
static const float EPSILON = 1e-6f;
90-
if (this->x * this->x + this->y * this->y > this->threshold_squared * scale - EPSILON)
90+
if (this->x * this->x + this->y * this->y
91+
> this->threshold_squared * scale + EPSILON)
9192
{
9293
int mask = 0;
9394
if (this->fingers == 3) mask |= swipe_gesture::MSK_THREE_FINGERS;

lib/gesture/xdo_gesture.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ extern "C"
2424
#include <xdo.h> // xdo, xdo_new
2525
}
2626

27+
#include "xdo_gesture.h"
28+
2729
namespace comfortable_swipe::gesture
2830
{
2931
/**

0 commit comments

Comments
 (0)