Do mousedown only for buttons 1 to 3

This commit is contained in:
Rico Tiongson committed 2020-04-18 02:23:32 +08:00
1 parent 435e46373f
commit 169f8dc788
2 files changed
+3 -2

No files matched your search

@@ -63,7 +63,7 @@ namespace comfortable_swipe::gesture
{
// eg. MOUSE DOWN hold3 mouse1
std::printf("MOUSE DOWN hold%d %s\n", this->fingers, mouseinput);
if (button != 0)
if (1 <= button && button <= 3)
{
// send mouse down on associated button
xdo_mouse_down(this->xdo, CURRENTWINDOW, button);
@@ -81,7 +81,7 @@ namespace comfortable_swipe::gesture
if (button != -1)
{
std::printf("MOUSE UP hold%d %s\n", this->fingers, mouseinput);
if (button != 0)
if (1 <= button && button <= 3)
{
// send mouse up on associated button
xdo_mouse_up(this->xdo, CURRENTWINDOW, button);
+1
View File
@@ -64,6 +64,7 @@ threshold = 0.0
#############################
# Experimental: MOUSE HOLD #
#############################
# (1: left click, 2: middle click, 3: right click, 4: wheel up, 5: wheel down)
# Uncomment to hold a mouse button on 3/4 fingers