aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSamuel Mannehed <samuel@cendio.se>2024-01-26 13:49:04 +0100
committerSamuel Mannehed <samuel@cendio.se>2024-01-26 13:49:04 +0100
commit973a8a237adb5a453f01698dc8636f63090dda36 (patch)
treeeeb3f83ef4238523ec6d50f4db807487ee7dbac8
parent6edbe662188b28cb370c3e56b0c0a3e5e79a4f58 (diff)
downloadtigervnc-973a8a237adb5a453f01698dc8636f63090dda36.tar.gz
tigervnc-973a8a237adb5a453f01698dc8636f63090dda36.zip
Increase time required to override pointerClient
Mouse events in shared connections are locked to one viewer at a time. If the a mouse drag is happening in the first viewer, the second viewer can't interfere unless the first viewer has been inactive for a set amount of time. This timeout was put in place in 71c83b479335337b25dc331d3fb4a6e29382ceb5 to handle the case where the first viewer disconnects while the mouse drag is happening. Prior to the timeout, this resulted in all input being blocked. This commit increases this timeout from 3 seconds to 10 seconds. This is to minimize the risk of this happening during "normal" use. With this change, the first viewer has to be inactive for 10 seconds before the second viewer can take control again. In the case where the first viewer disconnects, a waiting time of 10 seconds for the second viewer seems very reasonable.
-rw-r--r--common/rfb/VNCServerST.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/common/rfb/VNCServerST.cxx b/common/rfb/VNCServerST.cxx
index 50efbb3c..560a0ffa 100644
--- a/common/rfb/VNCServerST.cxx
+++ b/common/rfb/VNCServerST.cxx
@@ -493,7 +493,7 @@ void VNCServerST::pointerEvent(VNCSConnectionST* client,
// to provide a bit more sane user experience. But limit the time to
// prevent locking out all others when e.g. the network is down.
if ((pointerClient != NULL) && (pointerClient != client) &&
- ((now - pointerClientTime) < 3))
+ ((now - pointerClientTime) < 10))
return;
pointerClientTime = now;