diff options
author | Samuel Mannehed <samuel@cendio.se> | 2020-06-04 10:59:04 +0200 |
---|---|---|
committer | Samuel Mannehed <samuel@cendio.se> | 2020-06-04 10:59:04 +0200 |
commit | baae6518ef988b466373e366a7945f61df43c65d (patch) | |
tree | 976ecf0ea985c3398154df734005c35b4ca1b146 /vncviewer | |
parent | 10d9a8d9122effd16bdad230dbf634c5e714ca6b (diff) | |
download | tigervnc-baae6518ef988b466373e366a7945f61df43c65d.tar.gz tigervnc-baae6518ef988b466373e366a7945f61df43c65d.zip |
Add constant for TWOTOUCH_TIMEOUT
Diffstat (limited to 'vncviewer')
-rw-r--r-- | vncviewer/GestureHandler.cxx | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/vncviewer/GestureHandler.cxx b/vncviewer/GestureHandler.cxx index 6d9d8a4e..3430b968 100644 --- a/vncviewer/GestureHandler.cxx +++ b/vncviewer/GestureHandler.cxx @@ -54,6 +54,9 @@ const unsigned GH_TAP_TIMEOUT = 1000; // Timeout when waiting for longpress (ms) const unsigned GH_LONGPRESS_TIMEOUT = 1000; +// Timeout when waiting to decide between PINCH and TWODRAG (ms) +const unsigned GH_TWOTOUCH_TIMEOUT = 50; + GestureHandler::GestureHandler() : state(GH_INITSTATE), waitingRelease(false), longpressTimer(this), twoTouchTimer(this) @@ -192,7 +195,7 @@ void GestureHandler::handleTouchUpdate(int id, double x, double y) } else if(!twoTouchTimer.isStarted()) { // We can't determine the gesture right now, let's // wait and see if more events are on their way - twoTouchTimer.start(50); + twoTouchTimer.start(GH_TWOTOUCH_TIMEOUT); } } |